Montag 06.Mai

 
 
deutsch
english
 
 
 
 

Convert multiple web pages into a single PDF

STEP 1

To download the tool,go to www.snipca.com/37038 and select either the 32 bit or 64 bit version of the Windows installation file. Open File Explorer (press Windowskey+E), then navigate to the tool’s folder at c:\program files\wkhtmltopdf\bin. Next, press Alt+D to highlight the address bar in File Explorer,then type cmd and press Enter. A Command Prompt window will now open.

STEP 2

Open your browser and visit the web page you want to convert to a PDF, then copy its address (highlight the full address, then press Ctrl+C). In our example, we’ve opted for the Wikipediapage for the dwarf planet Pluto (https://en.wikipedia.org/wiki/Pluto.
Return to the Command Prompt window, type wkhtmltopdf followed by a space, then press Ctrl+V to paste the address. Next, enter a space, then type the name and location of the PDF file that you want to create (we’ve created a new c:\web pages folder for ours). The full command in our example is therefore wkhtmltopdf https://en.wikipedia.org/wiki/Pluto c:\webpages\Pluto.pdf.
Press Enter to run the command.

STEP 3

The tool will now start converting the web page into a PDF. Once it's finished, open File Explorer and navigate to the folder you chose to save the PDF in (c:\webpages,inourexample), then double-click the PDF to open it. As you can see, ours shows an exact replica of the Pluto page on Wikipedia. By default, all links on the page are clickable – if you click on one, it will open in your default browser. If you’d prefer to save a web page without active links, type --disable-external-links after ‘wkhtmltopdf’at the start of your command.

STEP 4

To include multiple web pages in your PDF, simply add their addresses to the command with a space between each. The order you enter them in your command dictates the order they appear in the PDF. In our example, we’ve added the Wikipedia page for Saturn to our PDF. You can continue adding as many pages as you like – just remember to add the file path and name of the PDF at the end. If you want to reduce the size of your PDF, you can remove images using the--no-images option (as before, you need to enter this after ‘wkhtmltopdf’ at the start of the command).

STEP 5

If the web pages you’re converting are fairly long, you can make it easy to navigate them by adding a page of contents at the start. To do this, begin your command with wkhtmltopdftoc. Once created, open the PDF and you’ll see a page at the start with links to each web page in the PDF and any sections within them .To go directly to a section, click the relevant link within the table of contents.

STEP 6

There are plenty of other options that let you tweak how your PDF looks - you can view them all by typing wkhtmltopdf-H(making sure the ‘H’ is uppercase).For example, if you want to increase the font size to 30pt, add the command--minimum-font-size30 (just after the ‘wkhtmltopdf’).If you’re converting multiple pages, adding this option applies the font size to all web pages. Alternatively,you can add it only to specific pages by placing the option after the appropriate addresses.

STEP 7

You can also convert web pages to image files, but there are a couple of caveats. Because this involves converting to
JPEGs, you won’t be able to search the text within them (as you can with a PDF). Additionally, you can’t convert multiple web pages into a single JPEG. To give it ago, type wkhtmltoimage followed by the web page address you want to convert and the name and location for the JPEG file. To convert the Pluto Wikipedia page, we would type wkhtmltoimage https://en.wikipedia.org/wiki/Pluto c:\webpages\Pluto.jpg.

© Jack Willson - Digital & Printdesigns | www.jackwillson.com