Page box borders computed with wrong formula #92

Closed
opened 2021-04-25 19:59:03 +00:00 by josch · 0 comments
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 2021-04-25 19:59:04 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
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
No description provided.