Convert multiple images into PDF using imagemagick
This one was quite a time-saver for me and a definite addition to the permanent toolkit.
I’ve happened to have a set of images that I needed to merge into a PDF. Having done it using Preview app on the Mac before, I was looking if a better solution was there. And what an elegant one it was!
It turns out that ImageMagick package has exactly the right tool for the job.
To simplify the execution, I’ve copied all the images to be merged into a single directory and made sure they were properly numbered (for example, all smaller numbers had the correct number of leading zeros).
Then, the command is trivial:
convert prefix*.jpeg document.pdf
No ImageMagick?
The process is slightly longer if you do not have ImageMagick installed:
- Install MacPorts
- Install ImageMagick
sudo port install ImageMagick