[cups.bugs] [MOD] STR #1843: pdftops adds garbage header to documents on FreeBSD, Solaris
Nathan Whitehorn
nathanw at uchicago.edu
Mon Jul 17 15:32:21 PDT 2006
[STR New]
On FreeBSD and Solaris (at the least -- these are the only non-Linux OSes I
have around), the pdftops filter adds an uncommented "Produced by
xpdf/pdftops..." header to all documents immediately after the PS-Adobe
declaration. This causes certain printers (e.g. Xerox Workcenter machines)
to fail, complaining about an unknown operand "Produced".
The problem occurs because of too few % signs in line 1161 of
PSOutputDev.cxx:
writePSFmt("% Produced by xpdf/pdftops %s\n", xpdfVersion);
The "% " is removed by sprintf() (as the spec says it should be, though
Linux does not seem to exhibit this behavior in the case of isolated %: on
Linux, % -> %, %%-> %, %%%-> %, whereas only the second two give % on
other systems). As such, there is no comment, and there is a blob of
invalid postscript at the top of all documents.
Changing the above line to the following fixes the problem:
writePSFmt("%%%% Produced by xpdf/pdftops %s\n", xpdfVersion);
Link: http://www.cups.org/str.php?L1843
Version: 1.2.1
More information about the cups-devel
mailing list