Html To PDF Converter Script

June 01, 2020


This script uses wkhtmltopdf to convert a series of webpages to PDF. For example the following script downloads pages 1 though 20:

#!/bin/bash
for i in {1..20}

do
    echo -e "Retrieving page $i\n"
    sleep 2
    wkhtmltopdf https://www.binaryspawn.com/$i/ binaryspawn$i.pdf 
    sleep 2
done
pdfunite may be used to make a single PDF from the individual ones.

Comments

©2013-2023 All Rights Reserved.