Bug 690347 - pswrite device generates %%%%BeginPageSetup
Summary: pswrite device generates %%%%BeginPageSetup
Status: NOTIFIED FIXED
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: PS Writer (show other bugs)
Version: 8.64
Hardware: PC Windows 2000
: P4 normal
Assignee: Ken Sharp
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-20 00:50 UTC by norbert.janssen
Modified: 2009-04-30 05:52 UTC (History)
0 users

See Also:
Customer: 661
Word Size: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description norbert.janssen 2009-03-20 00:50:36 UTC
probably introduced with 9396. The pswrite now generates the BeginPageSetup with
4 '%' characters i.s.o. the required 2. This is incorrect, and causes problems
when using DSC comments to insert tray/simplex/duplex/finishing commands.

gdevpsu.c: at line 287
in revision 9374,
     pprintld2(s, "%%%%Page: %ld %ld\n%%%%BeginPageSetup\n", page, page_ord);
     if (!pdpc->ProduceEPS)
         pprintld2(s, "%%%%PageBoundingBox: 0 0 %ld %ld\n", width, height);
 	  	 
     /*
      * Adobe's documentation says that page setup must be placed outside the
      * save/restore that encapsulates the page contents, and that the

revision 9396, 
     pprintld2(s, "%%%%Page: %ld %ld\n", page, page_ord);
     if (!pdpc->ProduceEPS)
         pprintld2(s, "%%%%PageBoundingBox: 0 0 %ld %ld\n", width, height);
  	     stream_puts(s, "%%%%BeginPageSetup\n");
     /*
      * Adobe's documentation says that page setup must be placed outside the
      * save/restore that encapsulates the page contents, and that the



probably (i did not investigate this) the stream_puts() does not the same as
pprintld2().
Comment 1 norbert.janssen 2009-03-20 00:54:18 UTC
FIX:
replace   	     stream_puts(s, "%%%%BeginPageSetup\n");
with  	             stream_puts(s, "%%BeginPageSetup\n");

at line 291 in gdevpsu.c


Comment 2 Ken Sharp 2009-03-20 01:31:28 UTC
Fixed in revision 9577, patch:

http://ghostscript.com/pipermail/gs-cvs/2009-March/009151.html

Thanks for finding and resolving the problem!