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 repeated the test on macOS 26.0.1. All the values displayed in the native macOS print dialogue were shown as expected. I only highlighted one case where I provided a PageRanges(1,5) and macOS intelligently switched to all pages in the native print dialogue, which is correct, but this could be unexpected. **Test with native (DialogTypeSelection.NATIVE) print dialog** |Pageable.getNumberOfPages|PrintRequestAttributeSet|displayed in macOS native print dialog |---|---|---| | 5 | - |(*)All Pages - ( )Ranage from 1 to 1| | 5 | PageRanges(1,5) |**(*)All Pages - ( )Range from 1 to 1**| | 5 | PageRanges(1,1) |( )All Pages - (*)Range from 1 to 1| | 5 | PageRanges(1,3) |( )All Pages - (*)Range from 1 to 3| | 5 | PageRanges(3,5) |( )All Pages - (*)Range from 3 to 5| | 5 | PageRanges(5,5) |( )All Pages - (*)Range from 5 to 5| | 5 | PageRanges(5,10) |( )All Pages - (*)Range from 5 to 10| | UNKNOWN_NUMBER_OF_PAGES | - |(*)All Pages - ( )Range from 1 to 1| | UNKNOWN_NUMBER_OF_PAGES | PageRanges(1,5) |**( )All Pages - (*)Range from 1 to 5**| | UNKNOWN_NUMBER_OF_PAGES | PageRanges(1,1) |( )All Pages - (*)Range from 1 to 1| | UNKNOWN_NUMBER_OF_PAGES | PageRanges(1,3) |( )All Pages - (*)Range from 1 to 3| | UNKNOWN_NUMBER_OF_PAGES | PageRanges(3,5) |( )All Pages - (*)Range from 3 to 5| | UNKNOWN_NUMBER_OF_PAGES | PageRanges(5,5) |( )All Pages - (*)Range from 5 to 5| | UNKNOWN_NUMBER_OF_PAGES | PageRanges(5,10) |( )All Pages - (*)Range from 5 to 10| ------------- PR Comment: https://git.openjdk.org/jdk/pull/11266#issuecomment-3496509402
