How to merge PDF files
April 7th, 2003 by Jiri
I have finally found a time to sort out the NAP’s book on authentication. As I am not alone who dislikes page by page view and because there are two older books I would eventually like to read, here’s how I did it.
1. Download all 153 PDF files using something like FlashGet (Jobs/New Download).
2. Append PDF files using ghostscript. This is a bit tricky because the how-to described in PDF FAQ actually does not work. The FAQ recommends to put all files in one directory and execute following command:
gswin32c -sDEVICE=pdfwrite -dNOPAUSE -dQUIET -dBATCH -sOutputFile=out.pdf *.pdf
First off, use full path before gswin32c. Secondly, Windows seem to dislike *.pdf and require list of all files, and therefore some additional steps are needed.2a) To get the list, one needs to create one using command line
dir *.pdf /b >list.txt
2b) Change and replace CRLF with space using your favourite word processor (suprisingly Word’s Find and Replace function can help here)Undoubtedly, the whole procedure would be much easier using some unix command line magic (probably sprinkled with some pipe, input redirect and grep spells). Unfortunately to do this I would have to reboot my computer and start to deal with the lack of winmodem drivers not talking about dealing with unused neuron paths in my brain that were once busy with linux command line signals.
Nevermind the clumsy way, I do have one 13 MB file now and finally am ready to print out the document.