[cups.general] pstops and DSC conformance

Michael R Sweet msweet at apple.com
Tue Nov 3 05:45:43 PST 2009


I don't have the DSC spec in front of me, but IIRC Adobe generally  
frowns on using save and restore in documents - they are both very  
expensive and can lead to strange results. Will do some research...

On Nov 3, 2009, at 4:51 AM, Tim Waugh <twaugh at redhat.com> wrote:

> 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.
> */
>
> _______________________________________________
> cups mailing list
> cups at easysw.com
> http://lists.easysw.com/mailman/listinfo/cups





More information about the cups mailing list