Important: The information in this document is obsolete and should not be used for new development.
Picture Comments to Avoid
TheSetGrayLevelpicture comment is now obsolete. ThePostScriptFile,TextIsPostScript,FormsPrinting,EndFormsPrinting,ClientLineLayout,PSBeginNoSave, andResourcePSpicture comments have limited use and are not recommended. This section describes the shortcomings of these picture comments.The
SetGrayLevelpicture comment was designed to provide access to the PostScriptsetgrayoperator 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 theSetGrayLevelpicture comment is often unpredictable. If direct access to the PostScriptsetgrayoperator seems desirable, it is preferable to send the instruction with thePostScriptHandlepicture comment.The
TextIsPostScriptpicture comment interprets all the text manipulated with QuickDraw text-drawing routines (namely,DrawChar,DrawString,DrawText, and anything else that calls theStdTextlow-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 theTextIsPostScriptpicture 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 thePostScriptHandlecomment and include a QuickDraw representation for all other printer drivers.The
ResourcePSpicture 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 thePostScriptHandlepicture comment.The
PostScriptFilepicture comment loads PostScript code from a file; as with theResourcePScomment, 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 thePostScriptHandlepicture comment.As with the
PostScriptBeginpicture comment, thePSBeginNoSavepicture 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; thePSBeginNoSavecomment was intended for situations where applications do not want to preserve the printer state. However, thePSBeginNoSavepicture 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 ofPSBeginNoSavecan 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
ClientLineLayoutpicture comment allows applications to redefine the major glyph, and the percentages of the line layout error assigned to the major and minor glyphs. TheClientLineLayoutpicture 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
FormsPrintingpicture comment directs the PostScript LaserWriter driver not to clear its page buffer after printing a page. TheEndFormsPrintingpicture 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.