-
Notifications
You must be signed in to change notification settings - Fork 647
Closed
Labels
Fixed in next releasefix developedrelease schedule to be determinedrelease schedule to be determinedupstream bugbug outside this packagebug outside this package
Description
Maybe someone can tell me, why the attached PDF-file is mirrored along the horizontal axis and the origin is bottom right.
The rotation is 0 and the rotation matrix is the identity-matrix.
The PDF is exported from software Rhino and I can not figure out where this transformation comes from.
I know that the problem is related to the PDF file. If I use files from other sources than Rhino everything works fine.
I used the code from issue #4378 to add some text at top left position:
import pymupdf
# code from https://github.com/pymupdf/PyMuPDF/issues/4378
doc = pymupdf.open("test.pdf")
page = doc[0]
rot = page.rotation
orig = pymupdf.Point(100, 100) # apparent insertion point
text = "Text at Top-Left"
mrot = page.derotation_matrix # matrix anihilating page rotation
page.insert_text(orig * mrot, text, fontsize=60, rotate=rot)
doc.ez_save("output.pdf")
The input file is test.pdf.
test.pdf
The result is output.pdf.
Any help is appreciated.
Metadata
Metadata
Assignees
Labels
Fixed in next releasefix developedrelease schedule to be determinedrelease schedule to be determinedupstream bugbug outside this packagebug outside this package