[cups.general] %%PageBoundingBox in DSC-conforming PostScript
Helge Blischke
h.blischke at srz.de
Mon Jan 26 08:49:06 PST 2009
Till Kamppeter wrote:
> Ghostscript 8.64 produces page headers like this when converting PDF to
> PostScript:
>
> %%Page: 2 2
> %%BeginPageSetup
> %%PageBoundingBox: 0 0 1191 842
> GS_pswrite_3_0_1001 begin
> 1191 842 null setpagesize
> /pagesave save store 197 dict begin
> 0.1 0.1 scale
> %%EndPageSetup
>
> Note that the "%%PageBoundingBox" line is in the "%%BeginPageSetup ...
> %%EndPageSetup" part. The pstops CUPS filter does not search the
> "%%PageBoundingBox" line there and adds its own "%%PageBoundingBox" line
> (with the values from the "PageSize" option) between "%%Page" and
> "%%BeginPageSetup":
>
> %%Page: 2 2
> %%PageBoundingBox: 0 0 595 842
> %%BeginPageSetup
> %%PageBoundingBox: 0 0 1191 842
> GS_pswrite_3_0_1001 begin
> 1191 842 null setpagesize
> /pagesave save store 197 dict begin
> 0.1 0.1 scale
> %%EndPageSetup
>
> It also takes the values of its own "%%PageBoundingBox" line to
> calculate the document bounding box in the end of the file, which leads
> to the document bounding box also having the values according to the
> "PageSize" option and not to the document.
>
> This breaks the printing of documents with multiple page sizes.
>
> Is this now a bug of Ghostscript misplacing the "%%PageBoundingBox" line
> or of the pstops filter not continuing to look for page DSC comments
> inside the %%BeginPageSetup ... %%EndPageSetup" section?
>
> Till
>
I think it is a Ghostscript bug. AFAIK, the "%%PageBoundingBox" belongs to the
page header comments, whereas the stuff between the "%%BeginPageSetup" and
"%%EndPageSetup" comment lines is thought to contain PS code that defines the
deviations ov the currend page from the general setup as defined between
"%%BeginSetup" and "%%EndSetup".
I'd suggest to file a Ghostscript bug.
By the way, how does gs 8.63 behave here?
Helge
--
Helge Blischke
Softwareentwicklung
H.Blischke at acm.org
More information about the cups
mailing list