Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!usc!elroy.jpl.nasa.gov!decwrl!adobe!gelphman From: gelphman@adobe.COM (David Gelphman) Newsgroups: comp.sys.mac.programmer Subject: Re: How do I determine which LaserWriter is selected in the Chooser? Message-ID: <12120@adobe.UUCP> Date: 6 Mar 91 23:24:35 GMT References: <1991Mar4.201133.9126@mtxinu.COM> <812@treehouse.UUCP> Reply-To: gelphman@adobe.UUCP (David Gelphman) Distribution: usa Organization: Adobe Systems Incorporated, Mountain View Lines: 23 In article <812@treehouse.UUCP> andyp@treehouse.UUCP (Andy Peterman) writes: >In article <1991Mar4.201133.9126@mtxinu.COM> scott@mtxinu.COM (Scott Seebass) writes: >>I am writing a DA and I would like to determine the name >>and zone of the LaserWriter that is currently selected in ... >Take a look in the 'PAPA' resource of the LaserWriter file. The latest >ResEdit knows the format of this resource. >Andy Peterman | Opinions expressed The thing to remember is to NOT look directly in the file named 'LaserWriter'. This may not be the users current printer driver. The correct thing to do is look at STR resource -8192 in the system file. This contains the current printer driver name. For a printer driver which drivers a PostScript printer over AppleTalk, the driver's PAPA resource -8192 contains the printer name, type, and zone information necessary for obtaining a connection to the printer the user has chosen. By not hardcoding the app to look only in LaserWriter but instead into the current printer driver this allows the user to rename the LaserWriter driver or to use a substitute driver, such as the one Adobe Systems is developing as a LaserWriter driver substitute. Hope this helps, David Gelphman Adobe Systems Incorporated