Skip to content

Instantly share code, notes, and snippets.

@jotto
Last active September 28, 2017 20:17
Show Gist options
  • Save jotto/95a7895bc3ed0a7c24ec5385447b4226 to your computer and use it in GitHub Desktop.
Save jotto/95a7895bc3ed0a7c24ec5385447b4226 to your computer and use it in GitHub Desktop.
// npm install prerendercloud
require('prerendercloud')
.screenshot("https://google.com")
.then(jpgBuffer => fs.writeFileSync("out.jpg", jpgBuffer));
require('prerendercloud')
.pdf("https://google.com")
.then(pdfBuffer => fs.writeFileSync("out.pdf", pdfBuffer));
curl https://service.prerender.cloud/screenshot/https://google.com/ > out.jpg
curl https://service.prerender.cloud/pdf/https://google.com/ > out.pdf
@jotto
Copy link
Author

jotto commented Sep 28, 2017

convert URLs to JPGs or convert URLs to PDFs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment