Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support multiple OUTPUT trays on single printer queue #1159

Open
lite1979 opened this issue Jul 28, 2023 · 6 comments
Open

Support multiple OUTPUT trays on single printer queue #1159

lite1979 opened this issue Jul 28, 2023 · 6 comments

Comments

@lite1979
Copy link
Contributor

A client inquired regarding sending print jobs to a (typically network-connected) printer with multiple output trays, and using QZ-Tray to differentiate among the output trays.

While we can control the input tray to some degree based on the available printer driver, output tray differentiation has not been tested.

Printer in question: Lexmark M5270

Output tray attachment: 4-Bin Mailbox (part # 40G0852)

As of now, they are able to send print jobs to separate output trays by listing each tray as a separate print queue on the network, using underscore1, underscore2 (i.e.: 192.168.1.208_1, 192.168.1.208_2, et cetera), but this requires onsite manipulation of the printer.

Is it possible to differentiate among the output trays using QZ-Tray and only one print queue?

@lite1979 lite1979 self-assigned this Jul 28, 2023
@tresf
Copy link
Contributor

tresf commented Jul 30, 2023

This may actually be missing from the JVM: https://stackoverflow.com/questions/37814540/specify-output-tray-mailbox-using-javax-print#comment63101949_37814540

I've filed a private bug report "QZ-13" with our JDK support provider, BellSoft.

@tresf tresf added the upstream label Jul 30, 2023
@tresf
Copy link
Contributor

tresf commented Aug 13, 2023

@tresf
Copy link
Contributor

tresf commented Sep 7, 2023

BellSoft has added preliminary support for this in a one-off build of JDK 22, but it requires testing against hardware with an output bin available. Furthemore, the attribute name used are preliminary and subject to change after OpenJDK review.

@tresf
Copy link
Contributor

tresf commented Nov 1, 2023

PR submitted for MacOS to OpenJDK here: openjdk/jdk#16166

@tresf
Copy link
Contributor

tresf commented Dec 24, 2023

Windows support may not be possible, quoting:

I have updated the pull request to list supported output bins on the common print dialog in JDK: 8314070: javax.print: Support IPP output-bin attribute extension by AlexanderScherbatiy · Pull Request #16166 · openjdk/jdk

For windows support I have found the comment on the social.msdn.microsoft.com forum that it is not possible to set output bins in wingdi programmatically:

Output tray is a printer-specific property (note that you will only see such an option in the printing interface for certain printers). There is no way to programmatically set an output tray, since there is no generic way of doing it via .NET (or even Win32 via the DEVMODE structure). The only way to set it is to allow the user to choose it via the provided printer dialog for the few printers that provide this capability (just as you must do via IE or Word).

It is sometimes possible to do this programmatically (without the dialog) for a specific printer if you know exactly how that printer driver implements the change...but that is unsupported except possibly from the printer manufacturer.

@tresf
Copy link
Contributor

tresf commented Jun 4, 2024

The upstream PR has been merged. This is feature is only available in MacOS and Linux currently and only JDK23+. If backported, it should land automatically into QZ Tray in a future version (e.g. perhaps #1218).

Note, this feature is not slated for Windows at this time. If there's a way to leverage this feature for Windows too, please share.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants