skip to main content

Library Routines : WIN$PRINTER : WINPRINT-SET-PRINTER-EX

WINPRINT-SET-PRINTER-EX
This functions selects a printer and set more features of that printer than the WINPRINT-SET-PRINTER allows.
The printer settings are evaluated only at the OPEN OUTPUT of the print-file. Calling this op-code in the middle of the print job has no effect.
When printing to PDF or Print Preview, the active printer is used to calculate margins. If you wish to avoid this, call the WINPRINT-SET-PRINTER-EX function with wprterr-no-printers set to true. You will be allowed to set only winprint-curr-copies and winprint-curr-orientation.
Syntax:
 CALL "WIN$PRINTER" USING WINPRINT-SET-PRINTER-EX
Parameters:
01  winprint-selection.
    03 winprint-name             pic x(80).
    03 winprint-port             pic x(80).
    03 winprint-driver           pic x(80).
    03 winprint-drv-version      signed-int.
    03 winprint-no-of-printers   signed-short.
       88 wprterr-no-printers    value -1.
    03 winprint-is-default       signed-short.
       88 wprt-is-not-default    value 0.
       88 wprt-is-default        value 1.
    03 winprint-copies           signed-short.
    03 winprint-orientation      signed-short.
    03 winprint-quality          signed-short.
    03 winprint-curr-orientation signed-short.
    03 winprint-curr-copies      signed-short.
    03 winprint-duplex           signed-short.
    03 winprint-collate          signed-short.
    03 winprint-color            signed-short.
    03 winprint-curr-duplex      signed-short.
    03 winprint-curr-collate     signed-short.
    03 winprint-curr-papersize   signed-short.
       88 wprt-{format}          value ...
    03 winprint-curr-tray        signed-short.
    03 winprint-curr-color       signed-short.
    03 winprint-job-title        pic x(80).
Note - members not mentioned below are not used by this function.
Note - If no printer is available in the system, set wprterr-no-printers to true before calling this function in order to avoid errors. You will be allowed to set only winprint-curr-copies and winprint-curr-orientation.
Return code:
returnCode can be any signed numeric data item and provides additional information:
List of supported papersizes

Copyright (c) 2017 Veryant
Contact us
Please share your comments on this manual or on any
Veryant product documentation with the email button at the top left