[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Latest in print job rec status

> Cc: D1830@AppleLink.Apple.COM (Jack Swisher & Assoc, M Wimble,PRT)
> Subject: Latest in print job rec status
> From: D1830@AppleLink.Apple.COM (Jack Swisher & Assoc, M Wimble,PRT)
> Date: 19 Sep 91 07:54 GMT
> I recently requested help on getting correct information from the PrJobDialog
> trap call. BILL@CAMBRIDGE.APPLE.COM@INTERNET#  responded with the message that
> follows.  His help has finally enabled me to read such information as first and
> last page numbers from the print job record, but copies still is always
> returned as 1, regardless of what I enter into the print dialog.  For those who
> want to try to track this down, or merely want the latest partial fix, here is
> a program snippet I use to test reading the print job info:
> (progn
>     (#_PrOpen)
>     (let ((pRec (make-record (:TPrint :storage :handle))))
>       (when (#_PrJobDialog :ptr pRec)
>         (format t "copies ~S, first ~S, last ~S~%"
>                 (rref pRec :tprint.prJob.iCopies)
>                 (rref pRec :tprint.prJob.iFstPage)
>                 (rref pRec :tprint.prJob.iLstPage)))
>       (dispose-record pRec))
>     (#_PrClose))
> [...]

If I run this code with the LaserWriter as the selected printer, it
returns 1 copy, regardless of what I type. When I run it with the
StyleWriter selected, it returns the number of copies that I specify.

If my code (MCL's WINDOW-HARCOPY function) prints to the LaserWriter
one time, I still get N copies. Apparently, the LaserWriter driver
caches the number of copies somewhere, tells the application to print
one copy, and takes care of the multiple copies itself.