isCOBOL Evolve : Appendices : Library Routines : WIN$PRINTER : WINPRINT-SET-CUSTOM-PAPER
WINPRINT-SET-CUSTOM-PAPER
The WINPRINT-SET-CUSTOM-PAPER function defines the paper dimensions.
The requested paper size must be supported by the printer (e.g. it must be available among the paper sizes offered by that printer) otherwise the function fails with a WPRTERR-BAD-ARG error.
 
Syntax:
 CALL "WIN$PRINTER" USING WINPRINT-SET-CUSTOM-PAPER
                          paperWidth
                          paperHeight
                          units
                   GIVING returnCode
Parameters:
WINPRINT-SET-CUSTOM-PAPER
Constant
 
paperWidth
any numeric data item or numeric literal
Specifies the paper width.
paperHeight
any numeric data item or numeric literal
Specifies the paper height.
units
any numeric data item or numeric literal
Specifies the measurement unit for the paperWidth and paperHeight values.
Valid values are 1 (inches) and 2 (centimeters). The constants WPRTUNITS-INCHES and WPRTUNITS-CENTIMETERS defined in isprint.def can be used.
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.