To convert to a single PDF file, you can run one command:
convert -compress jpeg *.jpg my-jpegs.pdf
Remember to enable the -compress jpeg flag, or it will save uncompressed images and result in a massive PDF file.
ImageMagick (via convert) requires Ghostscript (gs) to be installed to handle PDF files, which I assume. Beware of memory problems if you add a lot of JPEGs at the same time.
As for logical ordering, you can use ls in combination with convert to get the list in order.
Something along the lines of:
convert -compress jpeg `ls *.png` my-jpegs.pdf
See ls --help for various sorting options available.
Orbling
source share