I’d like to specify the input bins when printing with Java. I’ve found the MediaTray class which should correspond to the input bins:
The following standard values are defined for input-trays (from ISO
DPA and the Printer MIB):
'top': The top input tray in the printer.
'middle': The middle input tray in the printer.
'bottom': The bottom input tray in the printer.
'envelope': The envelope input tray in the printer.
'manual': The manual feed input tray in the printer.
'large-capacity': The large capacity input tray in the printer.
'main': The main input tray
'side': The side input tray
Source: https://www.rfc-editor.org/rfc/rfc2911
The problem is, that I get a number from the application which specifies the input bin. Can I simply map the enum int values or what is the common way to get to the enum value with a number? Is it even officially supported to number the trays?
I couldn’t find attributes in the RFC that correspond to the output bins. Is there also a way to do that?
And the most important question: Is the printer interface more or less reliable? Most threads I found where people asked about the trays eventually gave up, because they couldn’t get it to work.
Any experiences would be appreciated.
These attributes are defined in
javax.print.attribute.standard.MediaTray. See also, Standard Attributes: Media.