Online Textbooks: Downloading and Merging Multiple Chapters

by Carson Reynolds

Sometimes clueful authors provide PDF copies of their texts for free. Oft-times these same folks link a separate PDF for each chapter, which is convenient for browsing but annoying if you want to copy the whole text for off-line browsing and reference.

Case in point, Cain has a great list of online math texts. He has also co-authored with Herod a nice Multivariable Calculus text.

An elementary programming exercise: download each chapter as quickly as possible and assemble them into a single PDF. My own answer:

# grab the PDFs linked from the book's webpage
wget -r --no-directories --no-parent -A.pdf
# join the PDFs
pdftk *.pdf cat output multivariable-calculus.pdf