On Fri, 18 Jul 2025 13:19:10 GMT, Christian Heilmann <[email protected]> wrote:
>> This PR fixes a bug that caused no or the wrong set of pages to be printed >> when using page ranges on macOS. >> >> The main fix is to change the 'location' value of the returned NSRange from >> the knowsPageRange method to 1 in the native class PrinterView.m. > > Christian Heilmann has updated the pull request with a new target base due to > a merge or a rebase. The incremental webrev excludes the unrelated changes > brought in by the merge/rebase. The pull request contains five additional > commits since the last revision: > > - 8297191 fixed printing page range for e.g. page 2 to 2 on macOS > - 8297191 fixed printing page range for e.g. page 2 to 2 on macOS > - Merge branch 'master' of https://github.com/openjdk/jdk into pr/11266 > - Merge branch 'master' into pr/11266 > - 8297191 fixed printing page range for e.g. page 2 to 2 on macOS I've been looking this bug for the entire day, nearly. There's an existing test in JDK source code that can be used to reproduce the problem. The test is `test/jdk/java/awt/print/PrinterJob/PageRanges.java`. The test is supposed to be a jtreg manual test, but it cannot be run as such at the moment. It's tracked in [JDK-8320677](https://bugs.openjdk.org/browse/JDK-8320677). The id of the current bug, 8297191, should be added to the list of bugs in the `@bug` tag in the test `java/awt/print/PrinterJob/PageRanges.java`. The test is runnable as a standalone application using `java test/jdk/java/awt/print/PrinterJob/PageRanges.java`. This is how I tested initially. However, I've written my own automated test which verifies whether all the expected pages are printed because using the manual test was too tedious. ------------- PR Comment: https://git.openjdk.org/jdk/pull/11266#issuecomment-3221500046
