Batch convert a huge number of jpg images into one single pdf file

1 – Convert all the jpg files into pdf files with ImageMagick :

$ for i in *.jpg; do convert $i $i.pdf; done

2 – Merge, concantenate, join all the pdf files into one with pdftk :

$ pdftk *.pdf cat output output.pdf

Note : convert from ImageMagick won’t work if there are too many files or too little memory :

$ convert *.jpg output.pdf


One thought on “Batch convert a huge number of jpg images into one single pdf file

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>