How can I convert a series of images to a PDF from the command line on linux?

Jakob Weisblat picture Jakob Weisblat · Jan 21, 2012 · Viewed 139.9k times · Source

I have a scanning server I wrote in cgi/bash and want to be able to convert a bunch of images (all in one folder) to a pdf from the command line. How can that be done?

Answer

Marvin Pinto picture Marvin Pinto · Jan 21, 2012

Using imagemagick, you can try:

convert page.png page.pdf

Or for multiple images:

convert page*.png mydoc.pdf