CALL "WIN$PRINTER" USING WINPRINT-SET-PRINTER-EX WINPRINT-SELECTION GIVING returnCode |
WINPRINT-SET-PRINTER-EX | Constant | ||
WINPRINT-SELECTION | Group Item | Structure that contains the information to be passed to the function. This group item, defined in isprint.def, has the following structure: | |
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. | |||
winprint-name It is the name of the printer. When the function is called and winprint-no-of-printers is zero, the function searches for a printer with the name specified and selects it. | |||
winprint-no-of-printers It is the number of the printer to be selected. When this member is zero, the function selects the printer with the name specified in winprint-name. | |||
winprint-quality It is the print quality. Note that most laser printers do not support quality, while most dot-matrix printers do. Valid values, defined in isprint.def , are: | |||
WPRTSEL-QUALITY-DEFAULT | Default quality. | ||
WPRTSEL-QUALITY-HIGH | High quality. | ||
WPRTSEL-QUALITY-MEDIUM | Medium quality. | ||
WPRTSEL-QUALITY-LOW | Low quality. | ||
WPRTSEL-QUALITY-DRAFT | Draft quality. | ||
winprint-curr-orientation Is the paper orientation. Valid values are: | |||
WPRTSEL-ORIENT-DEFAULT | Default paper orientation. | ||
WPRTSEL-ORIENT-PORTRAIT | Portrait. | ||
WPRTSEL-ORIENT-LANDSCAPE | Landscape. | ||
winprint-curr-copies Is the number of copies the printer will print with the next job. | |||
winprint-curr-duplex Is the duplex setting. | |||
WPRT-SIMPLEX | No duplex. | ||
WPRT-DUPLEX-VERTICAL | Duplex vertical. | ||
WPRT-DUPLEX-HORIZONTAL | Duplex horizontal. | ||
winprint-curr-collate Is the current collate state. Valid values are: | |||
WPRT-COLLATE-OFF | Collate disabled | ||
WPRT-COLLATE-ON | Collate enabled | ||
winprint-curr-papersize Is the paper format. Set one of the available conditions to true. For example, setting the wprt-a4 condition to true would set the paper format to A4, setting the wprt-letter condition to true would set the paper format to Letter. Available papersizes are listed below. | |||
winprint-curr-tray Is the printer tray. Note - this field is not supported under Java 17. Valid values, defined in isprint.def , are: | |||
WPRT-UPPER-TRAY | |||
WPRT-LOWER-TRAY | |||
WPRT-MIDDLE-TRAY | |||
WPRT-MANUAL-TRAY | |||
WPRT-ENVELOPE-TRAY | |||
WPRT-ENVMANUAL-TRAY | |||
WPRT-AUTO-TRAY | |||
WPRT-TRACTOR-TRAY | |||
WPRT-SMALLFMT-TRAY | |||
WPRT-LARGEFMT-TRAY | |||
WPRT-LARGECAPACITY-TRAY | |||
WPRT-CASSETTE-TRAY | |||
WPRT-FORMSOURCE-TRAY | |||
winprint-curr-color It turns colors on or off. Set the variable to 1 in order to use colors or set it to 0 if you want a monochrome print. Note - Setting winprint-curr-color to 0 doesn't guarantee that the printer output will be black and white. The runtime doesn't perform any color conversion, it just passes the monochrome setting to the printer, then it's the printer duty to honor it. Most of the physical printers are able to convert the graphics to black and white, but the isCOBOL Print Preview window and the internal PDF printer are not. | |||
winprint-job-title Is the title of the job in the print spooler. |
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. |
Data-item (available in isprint.def) | Value | Description |
---|---|---|
wprt-letter wprt-lettersmall wprt-tabloid wprt-ledger wprt-legal wprt-statement wprt-executive wprt-a3 wprt-a4 wprt-a4small wprt-a5 wprt-b4 wprt-b5 wprt-folio wprt-quarto wprt-10x14 wprt-11x17 wprt-note wprt-env_9 wprt-env_10 wprt-env_11 wprt-env_12 wprt-env_14 wprt-csheet wprt-dsheet wprt-esheet wprt-env_dl wprt-env_c5 wprt-env_c3 wprt-env_c4 wprt-env_c6 wprt-env_c65 wprt-env_b4 wprt-env_b5 wprt-env_b6 wprt-env_italy wprt-env_monarch wprt-env_personal wprt-fanfold_us wprt-fanfold_std_german wprt-fanfold_lgl_german wprt-japanese-postcard wprt-env-9x11 wprt-10x11 wprt-15x11 wprt-env-invite wprt-us-letter-extra wprt-us-legal-extra wprt-tabloid-extra wprt-a4-extra wprt-letter-transverse wprt-a4-transverse wprt-letter-extra-transverse wprt-supera-a4 wprt-superb-a3 wprt-us-letter-plus wprt-a4-plus | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 43 44 45 46 47 50 51 52 53 54 55 56 57 58 59 60 | na-letter, 215900x279400 um na-letter, 215900x279400 um tabloid, null ledger, 279400x431800 um na-legal, 215900x355600 um Statement 5 1/2 x 8 1/2 in, 139700x215900 um executive, 184150x266700 um iso-a3, 297000x420000 um iso-a4, 210000x297000 um iso-a4, 210000x297000 um iso-a5, 148000x210000 um jis-b4, 257000x364000 um jis-b5, 182000x257000 um folio, 215900x330200 um quarto, 215900x275082 um na-10x14-envelope, 254000x355600 um 11x17 in, 279400x431800 um Note 8 1/2 x 11 in, 215900x279400 um na-number-9-envelope, 98425x225425 um na-number-10-envelope, 104775x241300 um na-number-11-envelope, 114300x263525 um na-number-12-envelope, 120650x279400 um na-number-14-envelope, 127000x292100 um c, 431800x558800 um d, 558800x863600 um e, 863600x1117600 um Envelope DL 110 x 220mm, 110000x220000 um iso-c5, 162000x229000 um iso-c3, 324000x458000 um iso-c4, 229000x324000 um iso-c6, 114000x162000 um Envelope C65 114 x 229 mm, 114000x229000 um iso-b4, 250000x353000 um iso-b5, 176000x250000 um iso-b6, 125000x176000 um italian-envelope, 110000x230000 um monarch-envelope, 98298x190500 um personal-envelope, 92075x165100 um US Std Fanfold 14 7/8 x 11 in, 198120x279400 um German Std Fanfold 8 1/2 x 12 in, 215900x304800 um German Legal Fanfold 8 1/2 x 13 in, 215900x330200 um japanese-postcard, 100000x148000 um na-9x11-envelope, 228600x279400 um 10 x 11 in, 254000x279400 um 15 x 11 in, 279400x381000 um Envelope Invite 220 x 220 mm, 220000x220000 um US Letter Extra 9 1/2 x 12 in, 241300x304800 um US Legal Extra 9 1/2 x 15 in, 241300x381000 um US Tabloid Extra 11.69 x 18 in, 296926x457200 um A4 Extra 9.27 x 12.69 in , 235458x322326 um Letter Transverse 8 1/2 x 11 in, 215900x279400 um A4 Transverse 210 x 297 mm, 210000x297000 um Letter Extra Transverse 9 1/2 x 12 in, 241300x304800 um SuperA/SuperA/A4 227 x 356 mm, 227000x356000 um SuperB/SuperB/A3 305 x 487 mm, 305000x487000 um US Letter Plus 8.5 x 12.69 in, 215900x322326 um A4 Plus 210 x 330 mm, 210000x330000 um |
wprt-a5-transverse wprt-b5-transverse wprt-a3-extra wprt-a5-extra wprt-b5-extra wprt-a2 wprt-a3-transverse wprt-a3-extra-transverse wprt-oufuko-postcard wprt-a6 | 61 62 63 64 65 66 67 68 69 70 | A5 Transverse 148 x 210 mm, 148000x210000 um B5 (JIS) Transverse 182 x 257 mm, 182000x257000 um A3 Extra 322 x 445 mm, 322000x445000 um A5 Extra 174 x 235 mm, 174000x235000 um B5 (ISO) Extra 201 x 276 mm, 201000x276000 um iso-a2, 420000x594000 um A3 Transverse 297 x 420 mm, 297000x420000 um A3 Extra Transverse 322 x 445 mm, 322000x445000 um oufuko-postcard, 148000x200000 um iso-a6, 105000x148000 um |