[comp.lang.postscript] Save/restore and showpage

glenn@heaven.woodside.ca.us (Glenn Reid) (05/01/90)

>Chris Lishka of Wisconsin State Laboratory of Hygiene (lishka@uwslh.UUCP)
>reported a problem of getting blank pages when moving the showpage outside
>of the save/restore pair.
>
>  INSIDE:                             OUTSIDE:
>%% Page: ? 1                        %% Page: ? 1
>save                                save
>  % Page drawing code here            % Page drawing code here 
>showpage restore                    restore showpage

My guess is that there is a frame buffer setup command somewhere inside
the save/restore.  If you execute some operator like "legal" or "a4" or
"letter", it initializes the device, which includes erasing the page.
save/restore preserve the current device, too, so if you said something
like this:

	save
	   legal
	   0 0 moveto 100 100 lineto stroke
        restore
	showpage

You might well get a blank page if the default device was "letter" or "a4".

I haven't actually tried this for a while; it's from recollection....

Glenn