Strange problem when page.cropbox changed #1269
-
OS: macOS 10.15.7 My use case:
Problem:page.get_pixmap(clip=page.mediabox) and page.get_pixmap(clip=page.cropbox) does not crop the right area as expected.
|
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 2 replies
-
I will have a look. |
Beta Was this translation helpful? Give feedback.
-
It is early in the morning here, but to me everything works as expected - nothing is strange. |
Beta Was this translation helpful? Give feedback.
-
Please consult the documentation! |
Beta Was this translation helpful? Give feedback.
-
CropBox is also the default for TrimBox, ArtBox and BleedBox. If CropBox is missing then MediaBox is used. See Adobe PDF guide. |
Beta Was this translation helpful? Give feedback.
Please consult the documentation!
Potntially except for page rotation and the top-left value, page.rect equals CropBox. The page may be rotated, but the CropBox never is. Width and height of the unrotated page always equal those of cropbox.
The top-left of page.rect always is (0,0).
So if you change the cropbox, you also change page.rect.