March 24, 2016

Command Line Tips: Download All the PDF Files Linked on a Webpage and Merge them Together (GNU/Linux)

Today I wanted to download a free ebook available on gameaipro.com. The page contains a list of links to PDF files, one for each chapter, so I wanted to download them all and merge them. To download the files I used wget (I limit the download speed using –limit-rate, if you don’t want to do it just delete that last part):

wget -r -A.pdf  http://www.gameaipro.com/ -c --limit-rate=150k

And to merge them together I used:

pdfunite *.pdf out.pdf