Path: utzoo!attcan!uunet!lll-winken!lll-tis!ames!mailrus!purdue!decwrl!labrea!polya!kaufman From: kaufman@polya.Stanford.EDU (Marc T. Kaufman) Newsgroups: comp.sys.mac.programmer Subject: Re: Two printer questions... Message-ID: <3068@polya.Stanford.EDU> Date: 17 Jun 88 15:44:39 GMT References: <1115@aucs.UUCP> Reply-To: kaufman@polya.Stanford.EDU (Marc T. Kaufman) Organization: Stanford University Lines: 33 In article <1115@aucs.UUCP> peter@aucs.UUCP (Peter Steele) writes: >I have two questions regarding printing. >1. I'm writing an application that should have Tall Adjusted turned on by >default if the imagewriter is chosen and have Larger Print Area turn on >by default if the laserwriter is chosen. These do not appear to be documented >fields in Inside Macintosh. What is the best way to go about setting these >attributes from within a program? You Validate your print record, then look at prStl.wDev to see what device is chosen. The high byte is the device number, which is 1 for the Imagewriter and 3 for the Laserwriter. The problems with doing this are 1) you won't be able to keep up with other device codes assigned to other manufacturers [e.g. it's an OK kludge for one site, but don't release it to the world], and 2) Apple makes no guarantees about the usage of undocumented bits, so someday the LW driver may change the meaning or position of the flag bit with no warning to you. >2. If I follow Inside Macintosh's printing guidelines (propen, propendoc, >propenpage,prclosepage,prclosedoc, and then de-spool if necessary), >I find that no printing is done until the de-spool is finally performed. >Effectively, the entire document is spooled to memory/disk and then >printed. Any other program that I test seems to print each page as it >is processed. Are all these programs breaking guidelines or is there a >way to force de-spooling to take place "legally" at any time during the >printing loop? See the Tech Note on "spool-a-page, print-a-page" (#125). Basically, this is a Driver issue, not an application issue. Printing each page as it is spooled causes each page to be a separate job, so that in a shared environment other printout can be interspersed between pages of your output. ----- Marc Kaufman (kaufman@polya.stanford.edu)