You can send PostScript programming strings to your printer by inserting PRINT fields in the document text. Microsoft Word sends the commands to the printer as native PostScript codes. PostScript commands embedded (embed: To insert information created in one program, such as a chart or an equation, into another program. After the object is embedded, the information becomes part of the document. Any changes you make to the object are reflected in the document.) in your document are carried out in the order in which you insert them. Use the following syntax:
{ PRINT \p Group "Codes" }
The y-coordinate space used for PostScript commands in Word is the same as for normal PostScript. The graphics origin (0,0) is in the lower-left corner of the page, and the positive directions are up and to the right. PostScript drawing instructions take place within a drawing rectangle. The graphics origin is translated to the lower-left corner of the drawing rectangle.
Instructions
\p Group
Defines the drawing rectangle that the subsequent PostScript instructions operate on.
Commands
PostScript drawing commands specified in a PRINT field operate only on the drawing rectangle that's defined by one of the group commands listed here.
page
Defines the drawing rectangle as the current page (default).
para
Defines the drawing rectangle as the paragraph that contains the PRINT field. The paragraph must be at least 1 inch tall for "para" to produce a result.
pic
Defines the drawing rectangle as the next picture after the PRINT field but before the end of the paragraph that contains the field.
Row
Defines the drawing rectangle as the current table row.
Cell
Defines the drawing rectangle as the current table cell.
"Dict" group command
Use the "dict" group command to create a PostScript group that contains definitions and procedures that will be carried out later on the same page. Don't use the "dict" command to draw. Microsoft Word doesn't provide "wp$" variables for "dict" groups, nor does it change the drawing origin, clipping, and axes.
Note Because Word text and graphics are printed on the same PostScript page as your PostScript commands, don't use operators (operator: A sign or symbol that specifies the type of calculation to perform within an expression. There are mathematical, comparison, logical, and reference operators.) that reset the PostScript environment. Avoid the following operators when using PostScript with Word: banddevice, copypage, framedevice, grestoreall, initgraphics, initmatrix, nulldevice, renderbands, and showpage.
Variables
Word also defines variables for use with the PostScript commands specified in a PRINT field. Values represented by the variables are in points, which is the standard PostScript unit.
Variables for all groups
The following variables are available to all groups of PostScript commands.
wp$y
Specifies the drawing height of the page, paragraph, row, or cell that the PRINT field is located in, depending on the Group argument (argument: A value that provides information to an action, an event, a method, a property, a function, or a procedure.) used. If the "\p pic" argument is used, "wp$y" refers to the drawing height of the next picture before the end of the paragraph that contains the PRINT field.
wp$x
Specifies the drawing width of the page, paragraph, row, or cell that the PRINT field is located in, depending on the Group argument used. If the "\p pic" argument is used, "wp$x" refers to the drawing width of the next picture before the end of the paragraph that contains the PRINT field.
wp$page
Specifies the current page number.
wp$fpage
Specifies the formatted page number (string).
wp$date
Specifies the current date (formatted).
wp$time
Specifies the current time (formatted).
wp$box
Specifies the path (path: The route that the operating system uses to locate a folder or file; for example, C:\House finances\March.doc.) that contains the drawing rectangle.
Variables for "page" and "para" groups
"Codes"
PostScript instructions. If the instructions contain more than one word, enclose them in quotation marks.
Notes
- To print PostScript over text, click the Options command on the Tools menu, click the Print tab, and then select the Print PostScript over text check box.
- For complete information about the PostScript programming language, see the PostScript Language Reference Manual and the PostScript Language Tutorial and Cookbook, both by Adobe Systems, Inc., and published by the Addison-Wesley Publishing Co., Inc.