[gs-devel] Operator redefinition

DEÁK JAHN, Gábor djg at tramontana.co.hu
Tue Sep 6 13:31:31 UTC 2011


On Tue, 06 Sep 2011 21:52:49 +1000, Russell Lang wrote:

Russell,

my very first angle off attack was EndPage all right as this is the "standard" way of doing such things. Basically, I had this:

<<
  /EndPage {
    exch pop
    2 eq
    { false }
    { EmitPage }
    ifelse
  }
>> setpagedevice

where EmitPage is a simple bool deciding whether this is a final page to be sent to the device (this is why I discard the incrementing page number and only check for the reason). Still, I got the white rectangle (although all page contents do appear properly, so if I manually delete the .fillpage rectangles, the resulting PDF is actually all right). This is why I suggested some foul play and seemed to narrow it down to .fillpage. :-)

But ooops, I finally made it work, although I don't yet know why it has to be that way. I did experiment a bit more because, even as I started to try out your suggestion of redefining those who use .fillpage, it really escaped me why those are better than to redefine .fillpage itself (and it's not primarily a question of "better" but whether if I'm not allowed to redefine one, why should I be allowed to redefine the other).

So, in the end, it works if I use -dDELAYBIND and I *don't* manually call .bindnow (I was under the assumption that I have to do that myself in that case). I simply redefine:

/.fillpage { } odef

and use the /EndPage above. I didn't suspect .bindnow at all because there is no message, it simply works differently with and without. Leaving it out doesn't seem to give any other problems.

Bye,
   Gábor

-------------------------------------------------------------------
Gábor DEÁK JAHN -- Budapest, Hungary
E-mail: djg at tramontana.co.hu


More information about the gs-devel mailing list