Closed
Description
I want to insert text into an existing PDF file. When the page orientation is landscape, text intended for the top-left corner appears on the right side of the page, and the text direction changes from left-to-right to top-to-bottom. I tried applying the solution mentioned in #2721 (multiplying the original coordinates by page.rotation_matrix), but now the text I'm trying to insert is completely invisible on the page.
Below is the test code I used:
`import pymupdf as fitz
doc = fitz.open("1.pdf")
page = doc[0]
x_user, y_user = 100, 100
pdf_point = fitz.Point(x_user, y_user) #* page.rotation_matrix
page.insert_text(pdf_point, "Text at top-left", fontsize=60)
doc.save("output.pdf")`