[comp.sys.mac.programmer] Two printer questions...

peter@aucs.UUCP (Peter Steele) (06/16/88)

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?

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?

Any and all comments appreciated.


-- 
Peter Steele, Microcomputer Applications Analyst
Acadia University, Wolfville, NS, Canada B0P1X0 (902)542-2201x121
UUCP: {uunet|watmath|utai|garfield}dalcs!aucs!Peter
BITNET: Peter@Acadia  Internet: Peter%Acadia.BITNET@CUNYVM.CUNY.EDU

kaufman@polya.Stanford.EDU (Marc T. Kaufman) (06/17/88)

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)

gae@osupyr.mast.ohio-state.edu (Gerald Edgar) (06/18/88)

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

For Tall Adjusted, some trial and error lead me to this:

BitSet(@printrecord^^.prStl.wDev,13);

-- 
  Gerald A. Edgar                               TS1871@OHSTVMA.bitnet
  Department of Mathematics                     gae@osupyr.mast.ohio-state.edu
  The Ohio State University                     gae@osupyr.UUCP
  Columbus, OH 43210                            70715,1324  CompuServe