-
If i creat a new portrait page, the start position at top left. then i set rotation with 90°, page turned landscape and the start position at top right. OK, how do i change position start at top left in landscape. This is not a bug, Thanks for you advice! |
Beta Was this translation helpful? Give feedback.
Answered by
JorjMcKie
Feb 7, 2022
Replies: 1 comment
-
So you used
>>> doc=fitz.open("1text.pdf")
>>> page=doc[0]
>>> page.set_rotation(90)
>>> p=fitz.Point(100,100) * page.derotation_matrix # converted point coordinates
>>> page.insert_text(p, "Hallo", rotate=90, color=(1,0,0))
1
>>> doc.save("x.pdf")
>>> |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
heyhumor
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
So you used
page.set_rotation(90)
.The next steps all depend on what you want to do with the page.
page.derotation_matrix
. If inserting e.g. text, also remember to insert it rotated (if that is what y…