My stomach churns when I see this kind of output.
http://www.freeimagehosting.net/uploads/e1097a5a10.jpg
and this was my command as suggested by Best way to convert pdf files to tiff files
gswin32c.exe -q -dNOPAUSE -sDEVICE=tiffg4 -sOutputFile=a.tif a.pdf -c quit
What am I doing wrong?
(commercial products will not be considered)
I have been using ImageMagick for quite a sometime. It's very nice tool with a lot of features.
Install ImageMagick and run following command. This is what I used on Linux, you may have to replace
convert
with the correct one.Below command converts PDFs to CCITT Group 3 standard TIFs (Fax standard):
Also you may use GraphicsMagick, it is also similar to ImageMagick, but ImageMagick more concerns with quality than speed.
tiffg4 is a black&white output device. You should use tiff24nc or tiff12nc as the output device colour PDFs - see ghostscript output devices. These will be uncompressed but you could put the resulting TIFFs through imagemagick or similar to resave as compressed TIFF.
setori's command does not specify the resolution to use for the tiffg4 output. The consequence is: Ghostscript will use its default setting for that output, which is 204x196dpi.
In order to increase the resolution to 600dpi, add a
-r600
commandline parameter:Also note that TIFFG4 is the standard fax format and as such it uses black+white/grayscale only, but no colors.
@jeff: Have you ever tried the
-dDITHERPPI=<lpi>
parameter with Ghostscript? (Reasonable values for lpi are N/5 to N/20, where N is the resolution in dpi. So for-r600
use try with-dDITHERPPI=30
todDITHERPPI=120
).I ran into the same problem with fax pages.
I was using Imagick in php and this command fixed the way it looked.
I didn't see any threshold option using 'gs' but convert may also work for you.
Like other posts suggested, use a color format (e.g. -sDEVICE=tiff24nc) and specify a higher resolution (e.g. -r600x600):
Thanks guys this is what I ended up with