Bug 607425 - setdistillerparams resets page device
Summary: setdistillerparams resets page device
Status: NOTIFIED FIXED
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: PDF Writer (show other bugs)
Version: master
Hardware: All All
: P2 normal
Assignee: Ray Johnston
URL:
Keywords: bountiable
Depends on:
Blocks:
 
Reported: 2002-09-10 10:35 UTC by Jack Moffitt
Modified: 2008-12-19 08:31 UTC (History)
0 users

See Also:
Customer:
Word Size: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jack Moffitt 2002-09-10 10:35:32 UTC
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 1 Jack Moffitt 2002-09-10 10:39:47 UTC
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.
Comment 2 Ray Johnston 2003-04-02 21:42:42 UTC
This bug is related to, and might be solved by the
same method as #563287.
Comment 3 Ray Johnston 2004-01-13 22:51:24 UTC
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.