Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Graphics behind text disappearing 1

Status
Not open for further replies.

khamm

MIS
Aug 7, 2002
2
US
First time post here. I have a printer command that is causing graphics in a text box in Word97 to disappear. It is probably a simple fix that someone familiar with Postscript will see right away. Here is the command that causes the graphics to disappear:

{PRINT \p page&quot;grestore matrix currentmatrix <</MediaType () /MediaColor (white) /MediaWeight 0>>setpagedevice setmatrix gsave&quot; \*MERGEFORMAT}

What we use this command for is to change paper trays on a Xerox 4635 production printer by changing the media color.

Any help would be appreciated.
 
&quot;setpagedevice&quot; completely re-initiliazes your page. It implicitly performs an &quot;erasepage&quot;.

As a rule, only use setpagedevice at the start of your pages, before you mark the page.
 
I have the same problem as khamm - to switch trays on a Xerox by passing appropriate Postscript code through Word.

Is there a way of converting khamm's code so that anything written on the page previously is saved & then restored after using the setpagedevice command? Or is there a way of preforming setpagedevice without erasepage?

I am using code similar to khamm's and it is at the top of the page. The problem is that this particular app uses header and footnote features of Word and these features are still getting wiped out by the setpagedevice command.
 
You cannot effectively redefine "setpagedevice" so that it doesn't perform an implicit "initgraphics" and/or "erasepage".

PostScript has to be interpreted, and rendered to a specific device. One step in that process is to convert from the PostScript coordinate space to device space. Then, marking instructions are rendered in the context of device space. How can you change paper trays, and thus potentially, the orientation and/or size of the paper, in the middle of this?

Or to think of it another way, how can you change the paper you're drawing on, without in effect, creating two separate pages?

There are two ways to do what you want: make the job control settings BEFORE PostScript is produced, via a PPD, for example, so that the PostScript stream has calls to setpagedevice built-in as it is produced, or process the PostScript AFTER it has been produced, with a job control package or by using a method like I described in thread280-870359.

Setting calls to setpagedevice in the middle of your source document is like setting landmines.




Thomas D. Greer
Providing PostScript & PDF
Training, Development & Consulting
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top