[gs-devel] Operator redefinition

Russell Lang gsview at ghostgum.com.au
Tue Sep 6 11:52:49 UTC 2011


A better solution may be to redefine the procedure or operator that calls .fillpage 
instead.  This may require using -dNOBIND, redefining the operator, then calling 
.bindnow and making systemdict readonly before executing your code.

For example, redefine showpage so it doesn't erase the page, but just resets the 
CTM.  When your PostScript file calls the modified showpage, it's behaviour is 

Another variant is to define a BeginPage or EndPage procedure, via 
setpagedevice.  This will alter the behaviour of showpage.


On 6 Sep 2011 at 13:15, DEÁK JAHN, Gábor wrote:

> Hello,
> I'm desperately trying to redefine .fillpage because I have to place
> several original pages onto one (a kind of imposition) and the current
> colored rectangle this operator creates is detrimental in my case. I
> tried all solutions I could think of (delay binding,
> -dWRITESYSTEMDICT, obind, odef) but either the redefinition doesn't
> take place (if issued before GS_PDF_Procset) or I get an invalidaccess
> error. What could be the solution (short of recompiling GS with
> zfillpage() butchered that I wouldn't like to do, I do need the
> original, unharmed program in many other cases)? 
> "systemdict /.fillpage known =" says the operator is in systemdict all right.
> "/.fillpage { } bind odef" (with all other variations of bind and def) is invalidaccess even if writing systemdict is allowed via the command line.
> Thanks,
>    Gábor
> -------------------------------------------------------------------
> Gábor DEÁK JAHN -- Budapest, Hungary
> E-mail: djg at tramontana.co.hu
> _______________________________________________
> gs-devel mailing list
> gs-devel at ghostscript.com
> http://ghostscript.com/cgi-bin/mailman/listinfo/gs-devel

Russell Lang                   gsview at ghostgum.com.au
Ghostgum Software Pty Ltd      http://www.ghostgum.com.au/

More information about the gs-devel mailing list