HylaFAX The world's most advanced open source fax server

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

[hylafax-users] Ghostscript commands to convert PDFs



Hi,

The typical recommendation for Ghostscript commands to generate a FAX TIFF file from a PDF is something like:

gs -q -r204x98 -dNOPAUSE -dBATCH -dSAFER -sDEVICE=tiffg3 -sOutputFile=output.tif -f in.pdf

If the PDF is a scalable one this usually works well. If the PDF contains a series of bit images of pages the resulting TIFF file has a width the same as those images. The TIFF file is then unsendable. If the size of the resulting images is forced with:

gs -q -r204x98 -g1728x2156 -dNOPAUSE -dBATCH -dSAFER -sDEVICE=tiffg3 -sOutputFile=output.tif -f in.pdf

The images will always (at least in every test I tried) be 1728 pixels wide, and sendable. However, if the original images were only, say, 850 pixels wide, the resulting FAX file contains images filling only half the width of the page.

Does anyone know a way to coax Ghostscript into always producing the kind of result we want for FAXing? It is certainly possible to run Ghostscript with the first command, check the sizes of the resulting images, and then rescale when the size is wrong. However, rescaling a bi-level monochrome image produces dreadful results, so its a pretty desperate measure. Most PDFs containing bit images contain gray-scale or true colour ones. It seems Ghostscript should be able to dither them down to a bi-level image 1728 pixels wide, of reasonable quality, if only I could figure out how.

Steve


____________________ HylaFAX(tm) Users Mailing List _______________________ To subscribe/unsubscribe, click http://lists.hylafax.org/cgi-bin/lsg2.cgi On UNIX: mail -s unsubscribe hylafax-users-request@xxxxxxxxxxx < /dev/null *To learn about commercial HylaFAX(tm) support, mail sales@xxxxxxxxx*




Project hosted by iFAX Solutions