Highlighted
Absent Member.
Absent Member.
1443 views

[archive] User defined Printer Tray Names

[Migrated content. Thread originally posted on 04 December 2006]

Hi Guys,

I am using the WINPRINT-GET-PRINTER-MEDIA function og WIN$PRINTER to get the printer trays supported by the printer. I am getting numbers above 256 which, according to Acucorp doc are user defined. Does anyone know how to turn these numbers into names such as "Tray 1" "Tray 2" etc?

Thanks

Nick Brook
0 Likes
4 Replies
Highlighted
Absent Member.
Absent Member.

RE: [archive] User defined Printer Tray Names

You can use OpenPrinter (to get a handle), with the handle you can call DocumentProperties to get the DEVMODE for the printer. With this DEVMODE you can then call DeviceCapabilities for papernames (DC_PAPERNAMES).
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] User defined Printer Tray Names

Thanks for the speedy reply Gforseth,

Are OpenPrinter DocumentProperties and DeviceCapabilities Standard Windows API or AcuCobol. Where can I find documentation for them please?

Regards

Nick Brook
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] User defined Printer Tray Names

They are standard Windows API functions and you can find documentation of them on msdn.microsoft.com.
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] User defined Printer Tray Names

After a couple of days wallowing around in the mire, I have finally got the APIs working in Acucobol and have a list of the trays that I wanted. Many thanks for your help.
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.