I have been bestowed upon a task to create a sample pdf of a recently published book on butterflies of Primorska and Notranjska (Slovenia). The full title reads Metulji Notranjske in Primorske (this is just too lure in google/start page searches ). It was authored by Slavko Polak with accompanying pictures from a number of lepidopterologists (butterfly experts). It is a pocket guide and ready to be used out in the field. Highly recommended.
But I digress. I had to create a sample pdf of a few pages to be put online for some spreading the word about the book. I have tried two methods to create these pdfs. One is extremely long, one is extremely short. Both produced a similar result.
I exported certain pages from the full pdf into png (ImageMagick). I joined two by two pages (GIMP) and transformed them into a jpeg (of lower quality and dimensions to keep the file size down) in ImageMagick again. This produced a 600 kB file which is OK, given that I don’t have a source file from which the pdf was created (which is about 8 MB), but has degraded the quality of the pages. This was partially the intent, but I’m having more and more reservations about it.
I used pdftk to extract desired pages into an output file. This took about 40 minutes less (seconds, actually) than the first method and produced an output file of superior quality and similar size (difference of about 50 kB).
pdftk is a pdf processing tool and I cannot recommend it highly enough. Kudos to the authors. pdftk is accessable through your repos (if you’re running a debian based distro).