


WINPRINT-GET-PAGE-LAYOUT
This operation code determines how many columns and rows of characters will fit on a page.
Usage
CALL "WIN$PRINTER"
USING WINPRINT-GET-PAGE-LAYOUT, WINPRINT-DATA,
GIVING RESULT
Parameters
WINPRINT-DATA Group item defined in "winprint.def" as follows:
01 WINPRINT-DATA.
03 WPRTDATA-SET-STD-FONT.
03 WPRT-PAGE-LAYOUT REDEFINES
WPRTDATA-SET-STD-FONT.
05 WPRTDATA-LINES-PER-PAGE UNSIGNED-SHORT.
05 WPRTDATA-COLUMNS-PER-PAGE UNSIGNED-SHORT.
Return Values
This operation returns the number of print rows that can fit on a page in
WPRTDATA-LINES-PER-PAGE, and the number of print columns in
WPRTDATA-COLUMNS-PER-PAGE. This accounts for the current page size, orientation, and printer font.
You may use this routine either before or after opening a print file.
Note: Because of the large number of variables involved with printing under
Windows (for example, the font size, the paper size, and print orientation), we
recommend that you use this routine to determine how many lines will fit on a page
when you are formatting reports.
However, we do not recommend using this operation when printing in DIRECT mode using "-P SPOOLER" or "-Q (printername)". When you print in DIRECT mode, the Windows print spooler has no control of the printer, and no initialization of the printer is performed by the Windows printer driver. This means that the print job uses the hardware defaults. For example, if you print in DIRECT mode to a printer with the hardware default paper size set to US letter format, that is the format used, even if the driver has A4 paper set as the default, in which case this operation is likely to return incorrect values.