Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!ames!pasteur!ucbvax!decwrl!labrea!polya!kaufman From: kaufman@polya.Stanford.EDU (Marc T. Kaufman) Newsgroups: comp.sys.mac.programmer Subject: Re: Printing Message-ID: <2956@polya.Stanford.EDU> Date: 29 May 88 02:12:28 GMT References: <1096@aucs.UUCP> Reply-To: kaufman@polya.Stanford.EDU (Marc T. Kaufman) Distribution: na Organization: Stanford University Lines: 33 In article <1096@aucs.UUCP> paul@aucs.UUCP (Paul Steele) writes: -The standard printing loop for Mac programming consists of: - propen; - propendoc ... - propenpage ... - print the page ... - prclosepage ... - prclosedoc ... - prpicfile ... - prclose; -The thing which I don't quite understand is the placement of prpicfile. -As far as I can tell, printing on the mac gets spooled to disk until -the prclosedoc statement. The prpicfile this prints the spooled file -on the printer. It seems to me that for printing large documents, it -would be necessary to do a prclosedoc/prpicfile after every page, rather -than after the entire document has been processed as demonstrated in -Inside Mac. My question is: Should a well-written program do a prpicfile -for each page, or just one at the end? Comments please. I am sure someone from Apple will also reply, and suggest that you read Tech Note #125: "The Effect of Spool-a-page/Print-a-page on Shared Printers"... which will point out that if you print each page separately, there is a chance that other jobs will be interspersed between pages of your job. Also, it will not work with background printing, because it will cause multiple spool files to be generated, instead of one spool file with multiple pages. When you call prpicfile, (which you need only do if the bJDocLoop field in the PrintRec is bSpoolLoop), you should first unload all unnecessary code segments and data, as the print driver for things like filmPrinters and the SC LaserWriter need lots of memory to work (see IM II-155). Marc Kaufman (kaufman@polya.stanford.edu)