-
Notifications
You must be signed in to change notification settings - Fork 606
PDF page is mirrored, origin is at bottom-left #4415
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This problem has nothing to do with rotation. I will forward this issue to MuPDF's bug report system. |
Associated MuPDF issue link: https://bugs.ghostscript.com/show_bug.cgi?id=708393 |
Confirming correct functioning of the fix using this snippet: import pymupdf
doc = pymupdf.open("test.pdf")
page = doc[0]
text = "Hello World"
print(page.is_wrapped) # Check if the page is wrapped
page.insert_text((100, 100), text)
page = doc.reload_page(page) # Reload the page to ensure the changes are applied
print(page.search_for(text)) # Search for the text to verify it was inserted correctly Output without the fix (esp. see wrong
After the fix applied:
Configuration info: MuPDF commit a9f6fc77d794f1cefac811c6e73c3352dfa5750b |
Thanks for your excellent response! This helps a lot! |
[Reopening until we've made a release with the fix.] |
This checks further mupdf fix for unbalanced "q"/"Q" graphics operators, which addresses #4415.
This checks further mupdf fix for unbalanced "q"/"Q" graphics operators, which addresses #4415.
This checks further mupdf fix for unbalanced "q"/"Q" graphics operators, which addresses #4415.
Fixed in PyMuPDF-1.25.5. |
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:
The input file is test.pdf.
test.pdf
The result is output.pdf.
output.pdf
Any help is appreciated.
The text was updated successfully, but these errors were encountered: