
Batch convert PDF to JPG
So, last night I needed to batch convert PDF files called v35_22_31_Auckland.pdf into JPG. Or to put it another way separate out the PDF’s pages and convert them into JPG images. I tried it a couple of ways including Converseen which did the job but renamed all the files badly and changed the image size (from A3 to A4). ImageMagick was the same although probably more from my misreading of the man
pages.
Batch convert PDF solution
Eventually I settled on using pdftocairo (part of the Poppler utilities) and specifying the x and y scale to retain the original page size. I found the page size by extracting one page using PDFMod and opening it in GIMP. After that I copied the original PDF into a folder and then opened a terminal in it and ran this command.
pdftocairo -jpeg -scale-to-y 1653 -scale-to-x 1169 v35_22_31_Auckland.pdf
It worked perfectly filling the folder with correctly sized JPG’s.