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

Philip Race philip.race at oracle.com
Tue May 7 17:24:28 UTC 2024



On 5/6/24 11:08 AM, Alexander Scherbatiy wrote:
> On Thu, 2 May 2024 18:30:23 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:
>>
>>    Change 'Page Setup' to 'Appearance' tab in the OutputBinAttributePrintDialogTest
> I added the `OutputBin` class and package-info.java changes to the CSR `javax.print: Support IPP output-bin attribute extension` description: https://bugs.openjdk.org/browse/JDK-8331601

The package-info text isn't spec. relevant, so I removed it from the CSR.
>
> The `OutputBin` class has two `myStringTable` and `myEnumValueTable` tables. They are private but their values are accessed through the public API. Should `myStringTable` and `myEnumValueTable` tables  be mentioned in the CSR?
I didn't think it was necessary, so I edited this out.
In general I cut out anything that wasn't spec and wasn't too hard to 
edit away.
> Should the changes in the common print dialog (the output bin label and the output bin combo-box) and new properties from the `serviceui.properties` be described in the CSR?

No need that I can see.

Good that you got it in and finalized this week.

-phil
>
> -------------
>
> PR Comment: https://git.openjdk.org/jdk/pull/16166#issuecomment-2096619785



More information about the client-libs-dev mailing list