Page box borders computed with wrong formula #92

Closed
opened 3 years ago by josch · 0 comments
josch commented 3 years ago
Owner

By jbarlow83 on 2021-03-25T20:26:10.960Z

img2pdf uses, for example:pagewidth - 2 * cropborder[1].
The correct formula is pagewidth - cropborder[1], because PDF rectangles specify the right-side coordinates [llx, lly, urx, ury] rather than one coordinate, width and height.

To illustrate the issue, if you set cropborder to 1 inch all around (72, 72), a PDF reader will actually crop the top and right by 2 inches.


By josch on 2021-04-13T16:29:22.670Z


Status changed to closed by commit 81325d3998

*By jbarlow83 on 2021-03-25T20:26:10.960Z* img2pdf uses, for example:`pagewidth - 2 * cropborder[1]`. The correct formula is `pagewidth - cropborder[1]`, because PDF rectangles specify the right-side coordinates [llx, lly, urx, ury] rather than one coordinate, width and height. To illustrate the issue, if you set cropborder to 1 inch all around (72, 72), a PDF reader will actually crop the top and right by 2 inches. --- *By josch on 2021-04-13T16:29:22.670Z* --- Status changed to closed by commit 81325d39983ba828f809061970f15f3969921271
josch closed this issue 3 years ago
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: josch/img2pdf#92
Loading…
There is no content yet.