[cups.bugs] [MOD] STR #3062: pdftops specifies page size to Ghostscript in a wrong way

Till Kamppeter till.kamppeter at gmail.com
Fri Jan 16 13:04:25 PST 2009


DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR New]

I had a look at the source code of the pdftops filter in the SVN repository
of CUPS:

http://svn.easysw.com/public/cups/trunk/filter/pdftops.c

If one compiles it without the "HAVE_PDFTOPS" flag set, Ghostscript is
used for the conversion.

If the printer's default paper size is et to A4, the following Ghostscript
command line is used:

gs -q -dNOPAUSE -dBATCH -dSAFER -sDEVICE=pswrite -sOUTPUTFILE=%stdout
-dLanguageLevel=3 -g595x842 -c 'save pop' -f <input file>

The paper size speciification ("-g595x842") is wrong (I have tested it).
"-g" specifies the paper size in pixels and not in points. So this gives a
way too small paper size and so only the lower left corner of the document
is printed. The correct Ghostscript call is

gs -q -dNOPAUSE -dBATCH -dSAFER -sDEVICE=pswrite -sOUTPUTFILE=%stdout
-dLanguageLevel=3 -dDEVICEWIDTHPOINTS=595 -dDEVICEHEIGHTPOINTS=842 -c
'save pop' -f <input file>

Link: http://www.cups.org/str.php?L3062
Version: 1.4-current





More information about the cups mailing list