Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Imaging With QuickDraw /
Chapter 9 - Printing Manager / Printing Manager Reference
Printing Manager Routines / Printing a Document


PrPicFile

Use the PrPicFile procedure to complete deferred printing.

PROCEDURE PrPicFile (hPrint: THPrint; pPrPort: TPPrPort; 
                     pIOBuf: Ptr; pDevBuf: Ptr; 
                     VAR prStatus: TPrStatus);
hPrint
A handle to a TPrint record (described on page 9-41) for a document.
pPrPort
A pointer to the printing graphics port. (The TPrPort record that defines a printing graphics port is described on page 9-48.) If this parameter is NIL, the PrPicFile procedure allocates a new printing graphics port in a heap.
pIOBuf
A pointer to an area of memory to be used as an input/output buffer. This parameter should be NIL to use the volume buffer for the spool file's volume. If you allocate your own buffer, it must be exactly 522 bytes.
pDevBuf
A pointer to a device-dependent buffer. This parameter should be NIL so that PrPicFile allocates a buffer in a heap.
prStatus
A TPrStatus record that PrPicFile uses to report on the current page number, current copy, or current file being spooled. You can then display this information to the user. The TPrStatus record is described on page 9-46.
DESCRIPTION
The PrPicFile procedure sends a file spooled for deferred printing to the printer.

You can determine whether a user has chosen deferred printing by testing for the bSpoolLoop constant in the bJDocLoop field of the TPrJob record contained in the TPrint record specified in the hPrint parameter. If the bJDocLoop field contains the value represented by the bSpoolLoop constant, call the PrPicFile procedure, which sends the spool file to the printer.

Your application should normally call PrPicFile after the PrCloseDoc procedure (described on page 9-65).

SPECIAL CONSIDERATIONS
Do not pass, in the pPrPort parameter, a pointer to the same printing graphics port you received from the PrOpenDoc function (described on page 9-64). If that port was allocated by PrOpenDoc itself (that is, if the pPrPort parameter to PrOpenDoc was NIL), then PrCloseDoc will already have disposed of the port, making your pointer to it invalid. Of course, if you earlier provided your own storage in PrOpenDoc, there's no reason you can't use the same storage again for PrPicFile.

ASSEMBLY-LANGUAGE INFORMATION
The trap macro and routine selector for the PrPicFile procedure are
Trap macroSelector
_PrGlue$60051480

SEE ALSO
For an example of the use of PrPicFile, see Listing 9-2 beginning on page 9-18.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996