Microsoft KB Archive/46204
PostScript Drawing Rectangles in Word 4.00 or 5.00
PSS ID Number: Q46204 Article last modified on 03-07-1997
====================================================================== 4.00 5.00 5.10 MACINTOSH kbprint
|The information in this article applies to:|
|- Microsoft Word for the Macintosh, versions 4.0 and 5.0|
When you use PostScript commands with Word for the Macintosh, the first argument should specify the drawing rectangle. The drawing rectangle is the area of the page on which the printer can actually print. To define this area, use one of following clipping commands:
PostScript Command Description ————————————————————-
.page. This command sets the drawing rectangle to the entire page. The origin is set to the lower-left corner of the physical page.
.para. This sets the drawing rectangle to the next non-PostScript paragraph. The origin is set to the lower-left corner of this paragraph.
To see the difference between these two PostScript commands, review the simple PostScript program below:
PostScript Command Result ————————————————————-
0 0 moveto Sets the current point to the origin
500 500 lineto Draws an invisible line up 500 and over 500 points
stroke Fills in the line you drew with the above commands.
With the .page. command set before the above PostScript commands, the first line (moveto origin) moves the current point to the lower-left corner of the page. Next, a line is drawn up and to the right of that corner. Because the drawing rectangle is the entire page, the only thing that limits the line is the .5-inch margin imposed by the LaserWriter. The printed document consists of a line starting .5 inch from the bottom of the page and .5 inch from the left of the page, which travels diagonally up and right about 6.5 inches in length.
With .para. set before the above PostScript commands, the first line (moveto origin) moves the current point to the lower-left corner of the next non-PostScript paragraph, wherever that might be on the page. As a result, if the PostScript code is the first thing entered on the page, the next paragraph is the first paragraph on that page. Note that the line that is drawn is limited not only by the physical margins of the LaserWriter, but also by the height of the paragraph, because this is what has been defined as the drawing rectangle. The actual printout is a line traveling from the lower-left corner of the next non-PostScript paragraph (that is, where the next line of text would start printing) traveling diagonally up and right, and ending at the top of that paragraph.
When you use the .para. command, also consider the following:
- The height of the paragraph extends from the descent line to the ascent line of a normal paragraph. For example, if you type “Sg” (without the quotation marks), the paragraph extends from the bottom of the “g” to the top of the “S”.
- Line spacing is included in the paragraph height. Therefore, a double-spaced paragraph is twice as tall as a single-spaced paragraph.
- The Space Before and Space After values are also included in the paragraph height. The variable wp$y always contains the height of the paragraph.
KBCategory: kbprint KBSubCategory: kbformat Additional reference words: 4.00 5.00 5.10 macword macword5 ====================================================================== ============================================================================= Copyright Microsoft Corporation 1997.