RFR: 8344119: CUPSPrinter does not respect PostScript printer definition specification in case of reading ImageableArea values from PPD files [v8]
Phil Race
prr at openjdk.org
Wed Jan 22 21:34:47 UTC 2025
On Wed, 22 Jan 2025 12:15:19 GMT, GennadiyKrivoshein <duke at openjdk.org> wrote:
>> **Description:**
>> The PR updates sun.print.CUPSPrinter's behavior in terms of reading media imageable area values according to the PostScript Printer Description File Format Specification.
>> The actual implementation reads X and Y coordinates of the upper right corner of the imageable area as width and height of the imageable area. https://bugs.openjdk.org/browse/JDK-8344119
>>
>> **Updates:**
>> Added subtraction of the X and Y coordinates of the lower left corner to fix the width and height values of the imageable area.
>>
>> **Tests:**
>> Tested with `test/jdk/javax/print/DialogMargins.java` using Brother DCP-T720DW, the test draws a black line along the borders of the imageable area.
>> The test was run with the minimum possible margins.
>> _Before the fix_: the right and bottom lines are not printed (the right and bottom lines are outside the printable area).
>> _After the fix_: all lines are printed.
>
> GennadiyKrivoshein has updated the pull request incrementally with one additional commit since the last revision:
>
> let user choose the printer
I had not looked at this PR properly until now.
FWIW I probably would myself have made the change in the Java code as was initially done,
but either is equivalent and I don't think it is worth flip-flopping and the fix is good to have.
-------------
Marked as reviewed by prr (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/22110#pullrequestreview-2568322668
More information about the client-libs-dev
mailing list