skip to main content

Library Routines : WIN$PRINTER : WINPRINT-GET-PRINTER-MEDIA

WINPRINT-GET-PRINTER-MEDIA
The WINPRINT-GET-PRINTER-MEDIA function allows you to access the paper sizes and paper trays supported by the printer.
Syntax
 CALL "WIN$PRINTER" USING WINPRINT-GET-PRINTER-MEDIA
Parameters
01  winprint-media.
    03  winprint-media-printer          pic x(80).
    03  winprint-media-port             pic x(80).
    03  winprint-media-papercount       signed-short.
    03  winprint-media-traycount        signed-short.
    03  winprint-media-paper              signed-short 
    03  winprint-media-trays         signed-short 
Returns an array of supported paper sizes. The array is limited to a maximum of max-paper-sizes possible sizes. Each number in the array corresponds to a paper size defined by WINPRINT-CURR-PAPERSIZE in isprint.def. The numbers in the array may not appear in sequential order .
Returns an array of supported paper trays. The array is limited to a maximum of max-paper-trays possible trays. Each number in the array corresponds to a paper tray defined by WINPRINT-CURR-TRAY in isprint.def. The numbers in the array may not appear in sequential order .
Note: The information returned by WINPRINT-GET-PRINTER-MEDIA may be incomplete because Java implements only some of the possible media paper and media tray, in particular the ones defined by the IPP (Internet Printing Protocol). However in the dialog box for the printer selection you could see more formats than the ones isCOBOL is able to handle, because, depending on the OS, special classes are supplied in order to cope with all the formats handled by the OS. So it could happen that, for example, there are four trays available but two of them are identified by the number 0 (unknown), meaning that those two trays are handled only on that operating system.
Return code
returnCode can be any signed numeric data item and provides additional information:

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