How to Bulk Convert Webpages to PDF

0 Comments
Editor Ratings:
User Ratings:
[Total: 0   Average: 0/5]




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.

PowerShell as administrator

Step 2: Set the executive policy. To do that, just run the command below.

Set-ExecutionPolicy Unrestricted

Unrestricted Policy

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.

Links

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.

Configure Script to convert webpages to PDF in bulk

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.

./bulk_webpage_to_pdf.ps1

bulk webpages to pdf in action

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.

Final thoughts:

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.

Editor Ratings:
User Ratings:
[Total: 0   Average: 0/5]

Get 100 GB FREE

Provide details to get this offer