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

Prasanta Sadhukhan psadhukhan at openjdk.org
Wed May 22 05:56:06 UTC 2024


On Tue, 21 May 2024 19:01:35 GMT, Alexander Scherbatiy <alexsch at openjdk.org> wrote:

>> The fix adds new public `OutputBin` print attribute class which allow to set a printer output bin in a `PrinterJob` class. The corresponding internal `CustomOutputBin` class is added as well.
>> 
>> - Constants used in `OutputBin` class are based on [Internet Printing Protocol (IPP): “output-bin” attribute extension](https://ftp.pwg.org/pub/pwg/candidates/cs-ippoutputbin10-20010207-5100.2.pdf) document.
>> - `CUPSPrinter.getOutputBins(String printer)` method uses PPD  `ppdFindOption(..., "OutputBin")` function to get supported output bins for the given printer on native level.
>> - The fix propagates the `OutputBin` attribute from the printer job attributes to `NSPrintInfo` print settings with `OutputBin` key on macOS.
>> 
>> The fix was tested on `Kyocera ECOSYS M8130cidn` printer where `ppdFindOption(..., "OutputBin")` call returns 4 output bins (text, choice): 
>> - Printer settings, None
>> - Inner tray, INNERTRAY
>> - Separator tray, SEPARATORTRAY
>> - Finisher (face-down), Main
>> 
>> if `Printer settings`, `Inner tray`, or `Finisher (face-down)` CustomOutputBins is set to `PrinterJob.print(...)` attributes a test page is printed to the Main tray of the  `Kyocera ECOSYS M8130cidn` printer. If `Separator tray` is used a page is printed to the Separator tray. This is consistent with the printer behavior when a native print dialog is used from a native Preview app to print a document on macOS.
>
> Alexander Scherbatiy has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Add OutputBin support on Linux

I am trying to test on "Xerox AltaLink B8155" MFP printer which is installed as IPP protocol to find "Generic Postscript Printer" driver..Selecting "AirPrint" is not able to find any driver for my macos14.3..and I am not able to find any "Finishing Options" in my native dialog as shown below so unable to test..

<img width="511" alt="Screenshot 2024-05-22 at 11 17 17 AM" src="https://github.com/openjdk/jdk/assets/43534309/abe22bd7-e6d6-4c54-888d-c1fa70f76aad">

Also, I thought the consensus was to staggard the fix and let one platform get in for it to bake for sometime and then add another platform later on..

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

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


More information about the client-libs-dev mailing list