I was talking to Chris Stazny yesterday about Printing stuff. Let me see if
I have it right:
1. Alway send all pages in your document off to the Print Manager.
The Print Manager is smart enough to extract the correct number of copies of
your complete document with the correct page range as read from the standard
print dialog.
2. build on the following sequece
DEF LPRINT
LONG IF PRCANCEL = 0
ROUTE _toPrinter 'route drawing to Chooser printer
FN PrintFirstPage
ROUTE _toScreen 'route drawing to Screen
CLEAR LPRINT 'eject first page
ROUTE _toPrinter
FN PrintNthPage
ROUTE _toScreen 'route drawing to Screen
CLEAR LPRINT 'eject nth page
ROUTE _toPrinter
FN PrintLastPage
ROUTE _toScreen
CLOSE LPRINT 'done printing, eject last page, close
the printer
END IF
Note that counterintuitively (to me anyhow) ROUTE _toScreen comes before a
CLEAR LPRINT or CLOSE LPRINT. (You will also probably need to use a Command
Period detection system to abort printing. I have omitted that in the simple
example above.)
3. If your document is very complex and certain or all of its pages take a
long time to image, it is possible to image only the required page range.
Talk to Chris about this.
I have concluded that PowerPC and G3 machines are so fast that the overhead
for imaging all pages in a document (leaving it to the Print Manager to
decide what to actually print) is, except in very unusual cases, negligible.
I have found this to be true, even when imaging quite large color images.
(Disclaimer: in my applications, images are completely in RAM. ALL of my
clients have PPC's or G3's with a minimum of 64MB of RAM-NO 68K machines.)
4) If you try and interpret the print Dialog's page range and/or number of
copies yourself and you don't know what you're doing, you end up fighting
the Print Manager. The 'fight' can cause seemingly random extra pages and/or
copies to be printed.
5) If you are using the PRINT command, always use a semi-colon at the end.
e.g PRINT temp$;
If you are printing at the bottom of your page and you omit the semicolon a
<c/r> is appended; this can cause your next print comand to start at the top
of a unintended new page....
I always start by using a framed text edit field in my printing so that:
1) I can see the exact box where the text will go.
2) Any text overflow will be masked and not cause an unexpected new page to
be printed.
When every thing is OK, I change the framed text edit fields to _noFrame.
6) I achieved a dramatic increase in page construction productivity when the
Adobe Acrobat Printer Driver was installed in the Chooser when I installed
the Adobe Acrobat Distiller- no more wasted paper and waiting for my very
slow printer to output. I estimated that my productivity in this tedious
process increased by a factor of at least ten. If you have to design a lot
of printer output, I highly recommend the purchase of Distiller just for
Chooser acces to the Adobe Acrobat Printer Driver.
I'm not an expert at this and I may have some of it wrong. Any corrections
or additions cheerfully accepted...
Cheers,