Convert JPG to PDF with ImageMagick
- 27 Jul 2017: Post was created (diff)
convert binary is supplied by ImageMagick, so if you haven’t already installed it, do so first.
ghostscript is also necessary to create PDF’s.
# pacman -S imagemagick ghostscript
Convert all JPG files in current directory to PDF with
$ for f in ./*; do convert $f $f.pdf; done
Combine all pictures in a single PDF file
$ convert "*.jpg" combined.pdf
ImageMagick produces invalid PDF’s
If the resulting PDF’s are corrupted or are otherwise not created as expected, make sure you actually installed