RFR: 8314070: javax.print: Support IPP output-bin attribute extension [v5]

Alexander Scherbatiy alexsch at openjdk.org
Fri Feb 2 17:41:01 UTC 2024


On Wed, 13 Dec 2023 16:04:44 GMT, Alexander Scherbatiy <alexsch at openjdk.org> wrote:

>> Alexander Scherbatiy has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Add output bins support to the common print dialog
>
> The common print dialog is updated to show supported output bins.
> 
> - `OutputPanel` is added to the `ServiceDialog` to show list of supported output bins in the ComboBox.
> - `order.output` and `label.outputbins` properties are added to `serviceui.properties`.
> - `CPrinterJob.nsPrintInfoToJavaPrinterJob()` method is updated to add the selected output bin from the native print dialog to the printer job attributes.
> - `OutputBinAttributePrintDialogTest` manual test that checks only printing to the first and the last supported output bins with common and native print dialog is added.
>  
> Common print dialog with the fix which shows list of supported output bins on macOS:
> <img src="https://github.com/openjdk/jdk/assets/23520046/ce66ab7d-9783-4e4f-93b9-207bad836541" width="50%">
> 
> The same dialog with disabled output trays when the list of output bins is empty:
> <img src="https://github.com/openjdk/jdk/assets/23520046/be50f92b-e346-4a42-9f52-bf4089e30e5f" width="50%">
> 
> The same dialog without the fix:
> <img src="https://github.com/openjdk/jdk/assets/23520046/904d60b3-d7a1-4235-a415-317b7dcba300" width="50%">
> 
> There is the comment on `social.msdn.microsoft.com` forum that wingdi does not support setting output bin attribute 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.
> 
> https://social.msdn.microsoft.com/Forums/en-US/b15eda2f-5353-41fc-b935-078ed0960aee/printing-into-a-specific-output-bintray-net
> 
> That is why `OutputPanel` is excluded from the `ServiceDialog` on Windows.

> @AlexanderScherbatiy This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

-------------

PR Comment: https://git.openjdk.org/jdk/pull/16166#issuecomment-1924382726


More information about the client-libs-dev mailing list