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().
FIX: replace stream_puts(s, "%%%%BeginPageSetup\n"); with stream_puts(s, "%%BeginPageSetup\n"); at line 291 in gdevpsu.c
Fixed in revision 9577, patch: http://ghostscript.com/pipermail/gs-cvs/2009-March/009151.html Thanks for finding and resolving the problem!