Summary: | setpagedevice does not have Level3 BeginPage behavior | ||
---|---|---|---|
Product: | Ghostscript | Reporter: | Chapman Flack <ghost> |
Component: | PS Interpreter | Assignee: | Ray Johnston <ray.johnston> |
Status: | NOTIFIED WONTFIX | ||
Severity: | normal | CC: | jackie.rosen |
Priority: | P3 | ||
Version: | 7.07 | ||
Hardware: | PC | ||
OS: | NetBSD | ||
Customer: | Word Size: | --- |
Description
Chapman Flack
2005-07-15 19:04:16 UTC
Just checked, this bug is present in AFPL Ghostscript 8.51. Even though Ghostscript is *NOT* compliant with the PLRM 3rd edition, the compliant behaviour relies on "They do not occur when the current device remains unchanged or when switching to or from devices of other kinds, such as ..." The vague description of "devices of other kinds" is problematic. While this can be seen to interfere with N-up printing, this is not a backwards compatible change and the compatibility with PS Level 2 printers is (as the bug reporter points out) not assured. Thus, I (in my admittedly flawed wisdom), deem this to be a change that we don't want to impose. Instead, I propose that those that code BeginPage procedures to not rely on this LL2 to LL3 indeterminate behaviour. Note, Even though I am closing this bug, I am still "Assigned", so any followup comment from the submitter or others will come to me (even if the bug is not reopened). > the compliant behaviour relies on "They do not occur when the current > device remains unchanged or when switching to or from devices of other > kinds, such as ..." I think more of that passage needs to be quoted: With the exception of step 4 (which setpagedevice always performs), these actions occur only when switching from one page device to another. They do not occur when the current device remains unchanged or when switching to or from devices of other kinds, such as the cache device or the null device set up by the setcachedevice or nulldevice operator. (PLRM3 p. 430) "With the exception of step 4 (which setpagedevice always performs)" is not a separable part of this passage. So, while > The vague description of "devices of other kinds" is problematic its vagueness does not extend to step 4, which is the central (and only) issue to this bug. > a backwards compatible change and the compatibility with PS Level 2 > printers is (as the bug reporter points out) not assured. A worthwhile question (and I'm not asking rhetorically--I really don't know the answer) would be, can anyone remember an example (other than ghostscript) of a Level 2 implementation that matched ghostscript on this behavior? As the language in PLRM2 can be read either way, it is possible that the new wording in PLRM3 was just Adobe's way of saying more clearly what they had done all along. I know there have been a number of printer and RIP brands with non-Adobe PostScript compatible interpreters, and I've always assumed there were probably fewer underlying implementations than brand names, but I don't have access to any of those to play with. You guys have surely seen much more than I have; do you know of Level 2 applications that behave this way?' > Instead, I propose that those that code BeginPage procedures to not > rely on this LL2 to LL3 indeterminate behaviour. I am modifying PageNest to insulate programmers from this question by discarding the interpreter's page count entirely and maintaining its own, uniformly along strict PLRM3 lines. It will also provide a mechanism for getting the ghostscript behavior, where that is wanted, also uniformly. That should give programmers the predictability to allow them to write programs. The issue affects not only n-up printing, but any application of BeginPage/EndPage that looks at page numbers, such as page selection, running header page numbering, and so on. Neither convention is terribly difficult to work with, but when you don't know which one you'll get, code can get ugly fast. It turns out that my Adobe LL3 interpreter also calls EndPage even for a bare <<>>setpagedevice, and ghostscript *does* match that behavior, even though that's an example where PLRM3 vagueness really does come into play; in case any future question comes up about that EndPage behavior I'll register my vote in advance against changing that - not only because it currently matches an Adobe implementation, but also because as it is now it provides the only really decent way to code a workaround for the BeginPage difference, so it is likely to be relied on. |