convert images to pdf

Use convert program (it is an executable installed as part of Imagemagick suite of tools):

convert "*.{png,jpeg}" -quality 100 outfile.pdf

In general case you can combine more files into one pdf file with including them inside {} and separate them with a single comma.

adding -quality VALUE to keep quality after conversion.

convert "*.{ext1,ext2,ext3,...}" -quality 100 outfile.pdf

I used the two sample pages you provided and printed them using cups-pdf printer resulting in two pdf files.

Then I used pdfsam to combine pdf files in one. I see no problem in the result.

Edit: I just saw that you have many files to process, you can use print-selected script in Nautilus described here


If all the images are in the same folder and have the same extension you could do the following:

Convert images to pdf:

ls *.tif | xargs -I% convert % %.pdf

Note: Note that if they are named 1...tif; 2...tif; 10...tif do ls -1v for numbered files

Merge pdf files into one pdf and remove single page pdfs:

pdftk *.pdf cat output merged.pdf && rm *.tif.pdf

Tags:

Imagemagick