isCOBOL Evolve : Appendices : Library Routines : WIN$PRINTER : WINPRINT-GET-PAGE-LAYOUT
WINPRINT-GET-PAGE-LAYOUT
The WINPRINT-GET-PAGE-LAYOUT function retrieves the number of printable lines and columns. The result depends on the chosen font, the page size, margins and orientation.
Syntax:
 CALL "WIN$PRINTER" USING WINPRINT-GET-PAGE-LAYOUT 
                          WINPRINT-DATA
                   GIVING returnCode
Parameters:
WINPRINT-GET-PAGE-LAYOUT
Constant
 
WINPRINT-DATA
Group Item
Structure that receives the information. This group item, defined in isprint.def, has the following structure:
 
01  winprint-data.
    03 wprtdata-page-layout.
       05 wprtdata-lines-per-page   unsigned-short.
       05 wprtdata-columns-per-page unsigned-short.
 
wprtdata-lines-per-page
It is the number of printable lines in a page.
 
wprtdata-columns-per-page
It is the number of printable columns in a page.
Return code:
returnCode can be any signed numeric data item and provides additional information:
1
Operation successful.
WPRTERR-UNSUPPORTED
The WIN$PRINTER library routine is not supported.
WPRTERR-BAD-ARG
The WIN$PRINTER library routine has been called with bad parameters.