Important: The information in this document is obsolete and should not be used for new development.
TPrint
You must supply a record of data typeTPrintfor 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 aTPrintrecord for a document.)In addition to other fields, the
TPrintrecord includes three fields (prInfo,prStl, andprJob) that are defined by theTPrInforecord (described on page 9-43), theTPrStlrecord (described on page 9-45), and theTPrJobrecord (described on page 9-44). TheTPrintrecord 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
TPrintrecord, use thePrDrvrVersfunction, which is described on page 9-76.prInfo- The information needed for page composition, contained in a
TPrInforecord. 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
rPagefield of theTPrInforecord.prStl- The printer's device number and the feed type, contained in a
TPrStlrecord. See page 9-45 for a description of this record.prInfoPT- Reserved.
prXInfo- Reserved.
prJob- Information about this particular print job, contained in a
TPrJobrecord. You use thePrJobDialogfunction to display the job dialog box. After the user closes the job dialog box, thePrJobDialogfunction updates the fields of theTPrJobrecord according to the user's choices. See page 9-44 for a description of this record.printX- Reserved.
TPrintrecord 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
TPrintrecord; your application should use thePrStlDialogfunction and thePrJobDialogfunction (described on page 9-58 and page 9-59, respectively) or thePrDlgMainfunction (described on page 9-60) to allow the user to specify printing options, which the printer driver then translates to the appropriate fields in theTPrintrecord. The only fields you may need to set directly are those containing optional information in theTPrJobrecord (for example, thepIdleProcfield, which contains a pointer to an idle procedure). Attempting to set other values directly in theTPrintrecord can produce unexpected results.