> 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 with a new target base due to a merge or a rebase. The pull request now contains 10 commits: - Add OutputBin row into the package-summary table - Move OutputBin panel to the Appearance tab - Merge branch 'master' of https://git.openjdk.org/jdk into JDK-8318023 - Add output bins support to the common print dialog - Merge master - Add empty lines between OutputBin constants - Add Override annotation to OutputBin and CustomOutputBin methods - Update OutputBin IPP Compatibility description - Remove System.out.printf(...) - 8318023: Implement IPP output-bin attribute extension on macOS ------------- Changes: https://git.openjdk.org/jdk/pull/16166/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=16166&range=05 Stats: 1190 lines in 13 files changed: 1190 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/16166.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16166/head:pull/16166 PR: https://git.openjdk.org/jdk/pull/16166