Skip to content

PyMuPDF coordinate system(s) #1806

Discussion options

You must be logged in to vote

CropBox:
A different coordinate system does not mean page.cropbox is a different thing from /CropBox. Only its values may be different from those found under /CropBox - because of the MuPDF coordinate system. That's all.
So inside PyMuPDF, the /CropBox array is taken, then page.transformation_matrix is applied to its values to yield the property page.cropbox.
Now clear?

Pixmap.x and Pixmap.y are coordinates of the top left corner?

Yes, but the top-left corner of the pixmap, nothing else. The values have nothing to do with any document page. Nothing at all. If a pixmap is made from a document page with default parameters, its irect equals page.rect.irect. This is where their relationship…

Replies: 4 comments 4 replies

Comment options

You must be logged in to vote
1 reply
@millivolt9
Comment options

Comment options

You must be logged in to vote
1 reply
@millivolt9
Comment options

Comment options

You must be logged in to vote
2 replies
@millivolt9
Comment options

@JorjMcKie
Comment options

Answer selected by JorjMcKie
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants