Since tiff2pdf
is now deprecated, ImageMagick is probably the best option, however a few extra options are needed so I am documenting this here in case anyone else is trying to figure out how to switch from tiff2pdf to ImageMagick.
In order to reproduce what tiff2pdf
used to do for full colour scanned documents, some of these extra options are needed:
magick -compress jpeg -quality 75 -units PixelsPerInch -density 300x300 -define pdf:title= -define pdf:author= output.pdf
-compress
matches tiff2pdf's -j
option, if you were using it
-quality
matches tiff2pdf's -q
option (to set JPEG quality as a percentage, lower values compress more, higher values look better)
-units PixelsPerInch
and -density
are required in order for the PDF page size to display properly. 300x300 should match your image density (e.g. if you scanned the image at 600 dpi then specify -density 600x600)
-define
will remove some metadata that ImageMagick adds to the PDF. You can specify values here if you still want the fields but want to set them to something else. If you omit the -define
that removes the document title, the PDF title will be set to the input filename, so you'll see the original filename even if later you rename the PDF file to something else.
You can confirm this is all correct by using the pdfinfo
utility. If you run pdfinfo output.pdf
check the "Page size" value, it should be something like 842.04 x 595.32 pts (A4)
where the page size is shown in brackets (A4, Letter, etc.) If you haven't set the -density
value properly, the page size won't appear in brackets, and you'll likely have problems if anyone ever tries to print the PDF as it may come out on the wrong paper size (e.g. on A3 paper instead of A4 if the printer has trays for both) or complain that the document won't fit on any paper in any of the printer's trays.