macOS: save as PDF does not work for PrinterJob.print(...) with attributes

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: P4
    • 11-pool
    • Affects Version/s: 11.0.16.1
    • Component/s: client-libs
    • Environment:

      OS: macOS

      openjdk version "11.0.16.1" 2022-08-12 LTS
      OpenJDK Runtime Environment (build 11.0.16.1+1-LTS)
      OpenJDK 64-Bit Server VM (build 11.0.16.1+1-LTS, mixed mode)

    • 2d

      The issue is reproduced with jdk 11.0.16.1 and is not reproduced with jdk-11.0.2.

      Steps to reproduce:
      - Run the attached WrongPaperForBookPrintingTest class on macOS
      - Select Save as PDF on the print dialog
      - Type the pdf name and press Save button

      The page is not saved as PDF. It is sent to printer.

      The code uses `PrinterJob.print(...)` with attributes:
      ```
                  PrintRequestAttributeSet aset = new HashPrintRequestAttributeSet();
                  aset.add(Chromaticity.MONOCHROME);

                  if (job.printDialog()) {
                      job.print(aset); // print with attributes
                  }
      ```

      Changing `job.print(aset)` to `job.print()` allows to save the content to pdf

            Assignee:
            Philip Race
            Reporter:
            Alexandr Scherbatiy
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: