-
Notifications
You must be signed in to change notification settings - Fork 274
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
Why merge pdf is flipped with example.. #36
Comments
@sunqianxiang i wrote some code based on the fancy_watermark.py, no issue with flipping. |
Either your watermark or your PDF pages are probably rotated. (Probably the PDF page, I think rotation for the watermark is handled.) If you have examples (especially if you have examples I can add to the test suite) please email them to me and I will fix. Thanks, |
but I maybe need normal merger..Such as for example with PyPDF2..
here generate not flipping pdf from code..but it have problem in pdf 1.4. |
Thank you for this bug report. I have checked in some code on a new branch that fixes this problem. When I did a rewrite of my merge code, I forgot to save graphics state if the object was a regular page and not a form XObject. Most PDFs work fine this way, but your example PDF alters the graphics state and leaves it altered (which is perfectly legal, but which I did not have a failing PDF for). I have not yet checked the fix into the master because I will first need to update expected checksums for the output of the watermark test. There is one changed file, here: https://github.com/pmaupin/pdfrw/blob/pagemerge_state_save_restore/pdfrw/pagemerge.py Please verify it works on all your files. Also, if you can create a non-sensitive file that the old one fails on and the new one works on I will add it to the test suite. @ThomasWaldmann -- you may also want this fix, depending on how much control you have over the PDFs you are watermarking -- it is a definite bug in pdfrw, but the PDFs you provided so far did not provoke it. Thanks, |
yup, works fine, had the same issue |
The branch to fix this is now merged, so I'm closing this issue. |
use example fancy_watemark.py or watermark.py go to run it.
But the resulting watermark are all horizontal and vertical flip.
watermark with reportlab generate.for example
Thanks in advance
Please tell me how to change it ..
The text was updated successfully, but these errors were encountered: