[cups.general] pstops and DSC conformance

Tim Waugh twaugh at redhat.com
Tue Nov 3 04:51:25 PST 2009


Hi,

I'm investigating a bug report about the pstops filter when used with
the 'number-up=2' option.  The troublesome document is created by
enscript, which does this sort of thing:

%%Page: (1) 1
%%BeginPageSetup
/_s save def
....
%%EndPageSetup
....
_s restore
gsave
showpage
grestore
%%Page: (2) 2
%%BeginPageSetup
/_s save def
....
%%EndPageSetup
....
_s restore
gsave
showpage
grestore


This leads to problems because pstops puts its own definitions at the
end of the PageSetup section, like this:

%%BeginProlog
userdict/ESPshowpage/showpage load put
userdict/showpage{}put
%%EndProlog
%%Page: (1) 1
%%BeginPageSetup
/_s save def
....
userdict/ESPsave save put
....
%%EndPageSetup
....
_s restore     %%%% ARGH, this undoes the ESPsave definition!
gsave
showpage
grestore
userdict/ESPsave get restore
/s save def
....
userdict/ESPsave save put
_s restore
gsave
showpage
grestore
userdict/ESPsave get restore

Because of the 'save/restore' bits already in there, the previous
definition of ESPsave is undone before it is used.

Is this sort of thing allowed in a DSC-conformant document?  I imagine
it can't be, but I can't find any definitive in my searching.

The actual bug report is here:
  https://bugzilla.redhat.com/show_bug.cgi?id=532516

Tim.
*/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part
URL: <https://lists.cups.org/pipermail/cups/attachments/20091103/9740a61f/attachment.bin>


More information about the cups mailing list