ADC Home > Reference Library > Technical Notes > Legacy Documents > Printing >
Important: This document is part of the Legacy section of the ADC Reference Library. This information should not be used for new development.
Current information on this Reference Library topic can be found here:
|
IntroductionOur compatibility testing for LaserShare (Apple's LaserWriter spooler) has turned up a number of applications that do not provide the Printing Manager with a document name; although this feature is not required, it is nice for users that share printers. Some printers (usually those that are shared between many users, like the LaserWriter) can provide the names of the users who are printing and the documents that are being printed to others interested in using the printer. If the chosen printer uses a document name, the Printing Manager gets the name from the frontmost window's title. If there is no front window, or if the window's title is empty, the Printing Manager defaults to "unknown." This method was chosen because it works most transparently to applications; however, it won't work if your application doesn't display windows when printing (for instance, many applications that use windows for their documents do not open their documents when printing in response to a Finder "Print" command).
As a general solution to this problem, you can put up a window containing a
message like "Press Cmd-. to cancel printing", and give it the document's
title. If the window is one that doesn't have a title bar (like
Since the Printing Manager checks the name at A number of applications set the document name in the print record directly. You should not do this because a) not all printers support this field, and b) none are guaranteed to support it in the future. (Apple does not guarantee that internal fields of the Printing Manager's data structures will remain the same; the Printing Manager is targeted for substantial internal change!) ReferencesThe Printing Manager Technical Note M.IM.DevIndPrinting -- Device-Independent Printing Downloadables
|
|