-
Bug
-
Resolution: Unresolved
-
P4
-
11.0.16.1
-
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)
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
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