paul@aucs.UUCP (Paul Steele) (05/27/88)
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. -- Paul H. Steele USENET: {uunet|watmath|utai|garfield}!dalcs!aucs!Paul Acadia University BITNET: Paul@Acadia Wolfville, NS Internet: Paul%Acadia.BITNET@CUNYVM.CUNY.EDU CANADA B0P 1X0 (902) 542-2201x587
kaufman@polya.Stanford.EDU (Marc T. Kaufman) (05/29/88)
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)
wu-j@CIS.OHIO-STATE.EDU (Cheng-shiung Jesse W) (06/28/90)
I use THINK's Lightspeed Pascal 2.0 to build an application. Recently I got problems to print a document from my application. After I called the procedure PrOpenPage, PrError became -8133 after the first instruction DrawString was executed. Sometimes I got PrError = 4023 when I tried to make a print out on LaserWriter. Do you folks have any idea what was the problems? I would like to know what other kinds of inforamtion about Printing Manager I can look up except Inside Macintosh, if there is any. Thanks in advance, Jesse Wu