Originally reported by: nobody@users.sourceforge.net The execution of setdistillerparams seems to reset the current page device at least partly. E.g. the values for keys like /BeginPage and /EndPage are reset to their default values. This behaviour seems to be due to the implementation of setdistillerparams by .putdeviceparams which does not allow to pass all page device parameters. Example code to demonstrate the error: %! <</BeginPage{==}>>setpagedevice currentpagedevice/BeginPage get == <<>>setdistillerparams currentpagedevice/BeginPage get == The first inquiry reports {==} as expected, but the second one reports {.callbeginpage}, and the "{==}" is no longer executed on a showpage event.
Comment originally by nobody@users.sourceforge.net Logged In: NO forgot to mention the gs version currently used (7.00), but a look at the cvs tree (looking into both gs_pdfwr.ps and zdevice.c indicates that the error will still be present.
This bug is related to, and might be solved by the same method as #563287.
The patch: http://www.ghostscript.com/pipermail/gs-cvs/2004-January/004000.html changes the setdistillerparams function to make sure that the pagedevice is not reset or erased.