Ghostscript: how to solve the output resolution of converting multi-page PDF to multiple TIFFs

I need to extract TIFF images from a heap of multi-page PDF files from a scanner. During the scan, I determined a resolution of 600 dpi.

  • Here is the code I used to create the TIFF images:

    gs -q -dNOPAUSE -sDEVICE=tiffg4 \
       -sOutputFile=a_page%02d.tif a.pdf -r600x600 -c quit
    

    This gave me the correct number of TIFF images, however the image size is smaller than expected.

    No matter how I change the setting -r, the output images are the same size.

    What happened here?

  • TIFF output images have some compression, how can I change the gs parameter so that they don't contain any compression?

    http://pages.cs.wisc.edu/~ghost/doc/cvs/Devices.htm#TIFF has several choices, but it seems to me that no one means "8-bit Black & White" + "Compression Free" .

Can anyone solve these two problems?

+5
source share
2 answers

If you use tiffg4for output, then you implicitly asked also to receive type of compression of fax G4 in PDF.

You can say that Ghostscript does not use compression using another TIFF output device, for example tiffgray(gray, 8 bits), tiff24nc(RGB-TIFF, 8 bits for each color channel), tiff32nc(CMYK-TIFF, 8 bits for each color channel), .... All of these output types are not compressed by default.

tiffg4, :

gs \
 -o a_page%02d.tif \
 -sDEVICE=tiffg4 \
 -r600x600 \
 -g4960x7020 \
 -sCompression=none \
  a.pdf

, , "8 + ". "1 + ", 1 , ...: -)

+4

:

 gs \
  -o a_page%02d.tif \
  -sDEVICE=tiffg4 \
  -r600x600 \
  -g4960x7020 \
   a.pdf

-g , TIFF . /.

+1

All Articles