Merging PDF documents with imagemagick / convert
Totally unrelated to GIS but a handy tip for linux users out there who want to merge several pdf's into a single document. You can do it from the command line like this:
`` convert -quality 90 -density 300x300 tim_sutton_cv_2010.pdf sam_cv_2010.pdf cvs.pdf``
The quality option is the jpeg compression level to use. The density option is important otherwise the resulting merged pdf will look crappy. Basically it determines the dpi of the output pdf (in my example above I'm putting out a 300dpi document). The merged file size will grow with higher density levels.
Then just give a list (in order of appearance) of pdf's to be merged and the final item in the list is the name of the output pdf.
One gotcha to note: convert rasterises the pdfs so you will no longer be able to select text in the pdf.
If you don't have imagemagick (which provides the convert command line tool) on your system (c'mon its an essential tool!) you can install it like this:
`` sudo apt-get install imagemagick``
Update: After posting this entry, Volker Mische wrote to me recommending pdftk (its in apt) which is easy to use and doesnt rasterise the pdfs when fusing them:
`` pdftk tim_sutton_cv_2010.pdf sam_cv_2010.pdf cat output cvs.pdf``