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

Latest in print job rec status



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))
 
Bill's original helpful reply follows:
======================================
I was totally stumped by this until I finally got a little feedback from
the StyleWriter driver today.  The problem was that two of the constituent
records of the TPrint record were too long, making the prJob subrecord 4
bytes lower than it should have been.  I haven't tested this yet with a
LaserWriter (won't be near one until Monday), but try changing the
definitions of the following two records in "interfaces;PrintTraps.lisp",
then evaluate (CCL::REINDEX-INTERFACES), you'll also need to reevaluate the
definition of the TPrint record, if it's already been loaded into your
world.  (Note: you'll probably want to exit and restart your Lisp after
doing REINDEX-INTERFACES as it creates about 300K of symbols in the TRAPS
package).
 
Ciao.
 
Bill
 
---------------------------------------------------------------------------
 
(defrecord tprstl
  (wdev :signed-integer)
  (ipagev :signed-integer)
  (ipageh :signed-integer)
  (bport :signed-byte)
  (feed :unsigned-byte))
 
(defrecord tprxinfo
  (irowbytes :signed-integer)
  (ibandv :signed-integer)
  (ibandh :signed-integer)
  (idevbytes :signed-integer)
  (ibands :signed-integer)
  (bpatscale :signed-byte)
  (bulthick :signed-byte)
  (buloffset :signed-byte)
  (bulshadow :signed-byte)
  (scan :unsigned-byte)
  (bxinfox :signed-byte))