Important: The information in this document is obsolete and should not be used for new development.
TPrint
You must supply a record of data typeTPrint
for a document before it can be printed. (See "Creating and Using a TPrint Record" beginning on page 9-14 for information about how to supply aTPrint
record for a document.)In addition to other fields, the
TPrint
record includes three fields (prInfo
,prStl
, andprJob
) that are defined by theTPrInfo
record (described on page 9-43), theTPrStl
record (described on page 9-45), and theTPrJob
record (described on page 9-44). TheTPrint
record and the records within it contain information such as that needed by your application for printing a document.
TYPE TPPrint = ^TPrint; {pointer to a TPrint record} THPrint = ^TPPrint; {handle to a TPrint record} TPrint = RECORD iPrVersion: Integer; {reserved} prInfo: TPrInfo; {resolution of device & page rectangle} rPaper: Rect; {paper rectangle} prStl: TPrStl; {printer driver number & feed type} prInfoPT: TPrInfo; {reserved} prXInfo: TPrXInfo;{reserved} prJob: TPrJob; {printing information from the job } { dialog box} printX: ARRAY[1..19] OF Integer; END;If you try to use a
Field Description
iPrVersion
- Reserved. To determine the version of the printer driver that initialized this
TPrint
record, use thePrDrvrVers
function, which is described on page 9-76.prInfo
- The information needed for page composition, contained in a
TPrInfo
record. See page 9-43 for a description of this record.rPaper
- The paper rectangle. This rectangle encompasses the page rectangle, which is specified by the
rPage
field of theTPrInfo
record.prStl
- The printer's device number and the feed type, contained in a
TPrStl
record. See page 9-45 for a description of this record.prInfoPT
- Reserved.
prXInfo
- Reserved.
prJob
- Information about this particular print job, contained in a
TPrJob
record. You use thePrJobDialog
function to display the job dialog box. After the user closes the job dialog box, thePrJobDialog
function updates the fields of theTPrJob
record according to the user's choices. See page 9-44 for a description of this record.printX
- Reserved.
TPrint
record that's invalid for the current version of the Printing Manager or for the current printer, the printer driver corrects the record by setting its fields to default values.Your application should not directly change the user-supplied data in the
TPrint
record; your application should use thePrStlDialog
function and thePrJobDialog
function (described on page 9-58 and page 9-59, respectively) or thePrDlgMain
function (described on page 9-60) to allow the user to specify printing options, which the printer driver then translates to the appropriate fields in theTPrint
record. The only fields you may need to set directly are those containing optional information in theTPrJob
record (for example, thepIdleProc
field, which contains a pointer to an idle procedure). Attempting to set other values directly in theTPrint
record can produce unexpected results.