Automate Web Page Snapshots - Batch Convert URL to PDF
If you’re looking for a simple way to store or archive web pages for offline viewing, createing a PDF is a pretty simple solution. This can be done easily enough as a one-off task via your browser.
However, if you’re interested in creating a historical archive, you’ll need to schedule this process. Flex.io helps you perform this task with a simple pipe.
Convert Any Webpage into a PDF
For this example, we’ll set up an automated process to convert a webpage url to a PDF. Let’s start building!
Input from a webpage; convert to PDF
We’ll use the ‘render’ command to convert to PDF. It takes a webpage url (in this case, Reddit) and converts it to a PDF:
render url: https://news.ycombinator.com/ format: pdf scrollbars: false
Send via email attachment
As a final step, we’ll simply output the pDF as an attachment and send them to ourselves daily via email:
email to: [your-email-address] subject: Here are your screenshots data: attachment
For longer term storage, it might be better to set up a connection to a file store, like Dropbox or Amazon S3.
Automating the process
You can run the process manually at any time. But, the next step is automating the process. To deploy you can do one of the following: