How can I convert TIFF files of various dimensions to uniformly sized PDF files with page size 8.5″×11″ without losing quality?

StackOverflow https://stackoverflow.com/questions/11941729

Domanda

Currently I'm trying to use Perl/ImageMagick and/or Ghostscript to convert scanned text documents stored as TIFFs into an 8.5″×11″ (ANSI A “Letter” size) PDF file.

I've tried many of the ImageMagick filters with resize and still find that some files perfectly legible before are now illegible. Often these images are at 72 dpi and when converted to be 8.5″×11″, it ends up with something like 612×792 pixels. The original was 1700×2200; as you can see there are quite a bit of pixels lost in the re-size.

Should I be using something else besides resize? Could it be something like ImageMagick is reporting the image is 72 dpi when it's really something like 200 dpi? Would re-sampling the image into the highest dpi that would fit in the 8.5″×11″ area help?

Does anyone have any other options to ultimately create a PDF file with all pages being 8.5″×11″?

È stato utile?

Soluzione

(Mantra: 'Use the right tool for the job...')

You possibly shouldn't use ImageMagick for the job, but rather LibTIFF's tiff2pdf commandline utility:

tiff2pdf          \
    -z            \
    -o output.pdf \
    -p letter     \
    -F            \
     input.tiff

-z is for (lossless) Zip/Flate compression.
-o defines the output filename.
-p sets the media size.
-F fills the page.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top