[cups.bugs] [HIGH] STR #2176: Postscript files following old Document Structuring Conventions get munged by pstops

J. Scott Berg jsberg at bnl.gov
Sat Dec 30 06:52:08 PST 2006


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

[STR New]

Under the old document structuring conventions (1.0), there is no
%%BeginSetup %%EndSetup delimiting the setup section.  The following
should do the trick for files like these: if you have not seen a %%Page,
%%BeginProlog, or %%BeginSetup comment yet, the first non-comment starts
either the prolog or the setup; if you see an %%EndProlog, it is the
prolog, and everything that follows is the setup; if you see %%Page before
seeing %%EndProlog, then it must have been setup.  Similarly, if you've
seen an %%EndProlog but haven't seen a %%BeginSetup or %%Page, the first
non-comment is the setup.  You could check the DSC version number and
verify whether it is less than 2.1 to know whether to follow this
algorithm (although I think the algorithm should work on 2.1 and higher
conforming documents).

Attached is an example file; view it with ghostscript to see what it
should look like, and print it to a printer with a non-trivial PPD to see
it come out wrong (the scale command ends up before the setpagedevice
commands from the PPD, and thus gets lost in the implicit initgraphics
that setpagedevice does).

This occurs on a print server running 1.1.23, but my reading of the pstops
code in 1.2.7 indicates that the problem will still occur there.

Link: http://www.cups.org/str.php?L2176
Version: 1.1.23
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lattice.ps.orig
Type: application/octet-stream
Size: 7032 bytes
Desc: not available
URL: <http://lists.cups.org/pipermail/cups-devel/attachments/20061230/8a2c1bbe/attachment.obj>


More information about the cups-devel mailing list