Important: The information in this document is obsolete and should not be used for new development.
Picture Comments to Avoid
TheSetGrayLevel
picture comment is now obsolete. ThePostScriptFile
,TextIsPostScript
,FormsPrinting
,EndFormsPrinting
,ClientLineLayout
,PSBeginNoSave
, andResourcePS
picture comments have limited use and are not recommended. This section describes the shortcomings of these picture comments.The
SetGrayLevel
picture comment was designed to provide access to the PostScriptsetgray
operator while drawing with QuickDraw in black-and-white mode. For most drawing operations, however, the printer driver sets the gray level to match the foreground color for the printing graphics port, and the effect of theSetGrayLevel
picture comment is often unpredictable. If direct access to the PostScriptsetgray
operator seems desirable, it is preferable to send the instruction with thePostScriptHandle
picture comment.The
TextIsPostScript
picture comment interprets all the text manipulated with QuickDraw text-drawing routines (namely,DrawChar
,DrawString
,DrawText
, and anything else that calls theStdText
low-level procedure) as PostScript code. There is no good reason to use this picture comment, but there is one important reason not to use it: printer drivers that do not support theTextIsPostScript
picture comment will print the PostScript text instead of interpreting it. If you need to transmit PostScript code directly to a printer that understands it, use thePostScriptHandle
comment and include a QuickDraw representation for all other printer drivers.The
ResourcePS
picture comment loads PostScript code from a resource file. The resource file is expected to be open at the time that you useResourcePS
. Under background printing, there are no guarantees the resource file will still be open when the Printing Manager needs it. If you want to keep PostScript code in a resource file, it is easy to write a routine that loads the resources and sends their contents using thePostScriptHandle
picture comment.The
PostScriptFile
picture comment loads PostScript code from a file; as with theResourcePS
comment, there are no guarantees the file will be open when the Printing Manager needs it during background printing. If you want to keep PostScript code in a file, it is easy to write a routine that loads the file and its contents using thePostScriptHandle
picture comment.As with the
PostScriptBegin
picture comment, thePSBeginNoSave
picture comment allows applications to change the state of a PostScript printer driver. Some applications do not want to restore the previous state of the PostScript interpreter after sending PostScript code; thePSBeginNoSave
comment was intended for situations where applications do not want to preserve the printer state. However, thePSBeginNoSave
picture comment allows applications to interfere with the LaserWriter 8.0 printer driver, and the driver, by calling the PostScript operatorgrestore
, can interfere with the application. The use ofPSBeginNoSave
can lead to incorrect clipping, incorrect colors, and PostScript language errors and should therefore be avoided.By default, most drivers apply about 80 percent of the total line layout error to the major glyphs (the space character) and the other 20 percent to the minor glyphs (all other glyphs). (When using a script system that does not use the space glyph to delimit words, the layout error is distributed evenly across all characters in the font.) The
ClientLineLayout
picture comment allows applications to redefine the major glyph, and the percentages of the line layout error assigned to the major and minor glyphs. TheClientLineLayout
picture comment is rather subtle and very specific to the PostScript LaserWriter driver. Only very ambitious page layout applications might be interested in this functionality, however; their designers should instead aim at a more general scheme of line layout control that does not rely upon this very driver-specific picture comment.Intended for printing forms on PostScript LaserWriter printers, the
FormsPrinting
picture comment directs the PostScript LaserWriter driver not to clear its page buffer after printing a page. TheEndFormsPrinting
picture comment directs the PostScript LaserWriter driver to clear its page buffer after printing a page. When a page is completed, applications must erase the areas that need to be updated and draw the new information. The graphics that make up the form are drawn only once per page, which may improve performance. However, you need to write a separate printing loop for the PostScript LaserWriter driver if you want to use this comment.