Skip to main content

[archive] User defined Printer Tray Names

  • December 4, 2006
  • 4 replies
  • 0 views

[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

4 replies

[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
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).

[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
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

[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
They are standard Windows API functions and you can find documentation of them on msdn.microsoft.com.

[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
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.