This tutorial explains how to bulk convert web pages to PDF. Using Chrome, you can convert webpages to PDF through the command-line interface that Chrome offers. Many people don’t know about this, but this is one of the most accurate and efficient methods to convert web pages to PDF. You can capture the full page and for multiple URLs, you can use a text file and create a batch file to process all those links
In this post, I will mention a simple PowerShell script that you can use to bulk convert webpages to PDF. Just execute the script with proper parameters and all the URLs in the supplied text file be converted to PDF. And not just Chrome but you can do this with Firefox and Edge as well. But I found the Chrome CLI to be faster, that’s why I will be using that for this post.
How to Bulk Convert Webpages to PDF?
You don’t have to install anything in order to make it work. Without any software or browser extension, you will be able to convert multiple URLs to PDF directly. Here is the step-by-step guide to do it on Windows.
Step 1: Open PowerShell with administrator rights.
Step 2: Set the executive policy. To do that, just run the command below.
Step 3: Download the PowerShell batch script from here.
Step 4: Get the text file ready with the URLs that you want to convert to PDF. Make sure that it only has URLs and 1 URL in each line.
Step 5: Now, just configure the script. Specify the values for variables in the input text file and output folder. See the screenshot for more details.
Step 6: Now, just navigate the PowerShell prompt in the folder where you have saved the script. Run it like this and then wait for it to finish. It will open every URL from the text file in Chrome and will save it to PDF. The best part is that it runs in headless mode, so you will not know that Chrome is running.
This is it. You can use the script in this way to bulk convert webpages to PDF. After it is done, it will save all the PDF files in the specified output directory. By default, it will save all the PDF files according to natural numbers. But you can change the renaming scheme based on your needs.
After lurking on Google and Reddit for hours, I have come to the conclusion that this is the best method available right now to convert web pages to PDF. I had around 300 links that I needed in PDF format and after spending hours, I finally did that using the script above. It is incredibly fast, as it took around 20 minutes for all the links to be converted to PDF. So, if you are also looking for ways to convert multiple links to PDF, then you are at the right place.