Futurebasic/Language/Reference/prhandle

Revised
FEBRUARY, 2002 (Release 6)

Description
This function returns a handle to the print record. The print record (also called a "TPrint record") contains useful information about the printer and about the current print job (if any). For a complete description of the contents of the print record, see the "Printing Manager" chapter of Inside Macintosh: Imaging with QuickDraw. A few of the more useful fields from this record are listed here:

¥ pRecH&amp;..prInfo.rPage This gives the print page rectangle. You can get the width and height of the page as follows:

Use these numbers to determine how much room is available for text and graphics. The page rectangle is affected by the user's selections in the "Page Setup" dialog: for example, if the user selects "landscape" mode, the page width will be greater than the page height.

¥ These numbers indicate the first and last pages which the user wants to print. Your program should not print any pages outside of this range.

¥ The number of copies to print. This is the number of times your program should send the selected pages to the printer. Note that many newer printer drivers will always set this number to 1; such printer drivers will handle multiple copies internally.

Note:> is partially emulated for Carbon. FB creates a 120 byte handle and fills in a few standard rectangles and other values so that programs won't be so likely to break during the transition period to OS X. But these emulations are not something that you should depend on in all future versions of the IDE.