LaserWriter: Print Manager Calls for Selecting Print Driver



I am writing code in MacApp and have a question on the Print Manager. I have
figured out how to use the value of a variable to determine if the printer
chosen by the user is a LaserWriter or ImageWriter. However, I can't tell if
it is a PostScript LaserWriter, a LaserWriter IINT, LaserWriter IINTX, or a
LaserWriter IISC. What I need are the calls to determine if the chosen printer
is a PostScript printer or not. The reason they need this information is that
in their program they are printing encapsulated PostScript files. They want to
display a dialog box warning users if they are going to a non-PostScript
LaserWriter, they will not be able to print that image.

You can get the information on what printer driver has been selected by
inspecting the value of the fLastPrinterName field of the TStdPrintHandler
object belonging to the view you are trying to print. The fLastPrinterName
field is changed to reflect the printer driver most currently selected in the
Chooser when a Print or Page Setup command is issued. For the LaserWriter IISC
print driver, the value of this field is "LaserWriter IISC." If a
network-based printer is chosen using the LaserWriter driver, the field
contains "LaserWriter."


Published Date: Feb 18, 2012