Multiple URLs into One PDF or into Multiple PDFs

Our regular Save As PDF Links are meant to quickly let your customers turn single webpages into PDF by adding a simple link to your pages. But there are also cases where you want to turn multiple URLs into PDF and still have a user do this live with the click of a button.

You can use our batch URL to PDF API with some simple JavaScript that we will explain below. You can see it in action when you click the button in the "Live Example" section on the right.

The button in the live example on the right shows how a "save as PDF" button can work when you have multiple URLs that you want to process into one larger PDF.

How does it work?

Our Batch URL to PDF API takes a list of URLs as input and returns a PDF. With the JavaScript below you take such a list of URLs and send it our API. Then our API will return a PDF and the JavaScript will update the user on the progress and then display the final PDF to the user.

Below is the basic JavaScript code that you should link to the click of your button. You can do this by adding onclick="PDFmyURL()" to your save as PDF button or link.

To fully customize this example for your own needs you need to do the following: