[comp.lang.postscript] Weird black prints

batcheldern@hannah.dec.com (Ned Batchelder, PostScript Eng.) (11/12/88)

The reason for the black page is not a bug in the printer: it is what your
PostScript program asked for. The transfer function is being inverted with
{ 1 exch sub } settransfer. When showpage executes, it performs the
equivalent of an erasepage, which sets the entire page image to white, but
the white is interpreted via the transfer function, so it actually ends up
as black.

There are two ways to fix this problem. Both involve changing the program
that generated the PostScript file (psraster?). The first is to not invert
the transfer function. This would involve inverting the hex data instead. This
is the right thing to do, because the way the transfer function was inverted
is bad: it should have taken into account the existing transfer function,
but it doesn't. It simply clobbered it. The second way to fix it is much
more likely to be the one picked, and that is simply to take the code:
	showpage
	grestore
	gsave
and make it be:
	grestore
	showpage
	gsave
That way the showpage executes in the graphic context that existed before 
the transfer function was changed, so the page will be erased properly.

--Ned.