How to ensure the coordinate origin of a PDF page remains stable? #3937
Replies: 2 comments 2 replies
-
You can find out whether a page is rotated ( I have no idea how to determine a left-right or top-bottom flip however. |
Beta Was this translation helpful? Give feedback.
-
I am struggling with the same issue. I would have thought that was the solution but clearly I'm missing something. After looking through the docs I do not understand how to use the morph=(point,matrix) parameter ... is there somewhere to look for examples of that or documentation of the morph parameter? Thanks to all contributors for this excellent tool. Edit Apologies -- page.remove_rotation() did in fact solve my issue (my mistake in believing it did not) |
Beta Was this translation helpful? Give feedback.
-
Hi, developers! I encountered an issue while using PyMuPDF. Some pages in my PDF document have been rotated or flipped upside down. When I try to add page numbers to the bottom-left corner, the position calculation still uses the coordinate origin from before the page was rotated, which causes the page numbers to be placed in the wrong position. How can I ensure that the coordinate origin is always at the top-left corner, or are there other ways to make sure the page number is inserted at a stable position? My demo code⬇
Beta Was this translation helpful? Give feedback.
All reactions