-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Output PDF has loss of data #1607
Comments
This is indeed a pypdf bug which occurs since version 2.10.9. The problem will be fixed with tomorrow's update to version 3.4.0 (PR #1563). When PDF pages are transformed with non-integer values, this results in floating point numbers with a precision of more than 19 decimal places. Unlike other PDF viewers, Acrobat cannot handle this. See Github issue #1376 for details. |
@zain910128 |
I close this issue as Fixed. @zain910128 feel free to provide more info if you want to re open it |
Sorry, i didn't get the chance to check earlier. The original input file that i provided is now converted properly and looks fine in all PDF viewers. Then i tried with a new input file which is very similar and has one extra page. Attached here for reference: The output of this file has colours all wrong in mac's Preview and google drive and the browser's pdf viewer, but fine in Adobe acrobat. So I think we have to reopen this issue. This may be related to my other issue here: |
The latest inputs look like a duplicate of #1615 |
That's fine for me :-) I also had the feeling the issue was duplicated :-) |
I am using the following code to resize pages in a PDF:
Source: https://stackoverflow.com/a/75274841/11501160
While this code works fine for the resizing part, I have found that most input files work fine but some input files do not work fine.
I am providing download links to input.pdf and output.pdf files for testing and review. The output file is completely different from the input file. The images are missing, the background colour is different, even the pure text on first page has only the first line visible.
What is interesting is that these difference are only seen when I open the output pdf in Adobe Acrobat, or look at the physically printed pages. The PDF looks perfect when i open in Preview (on MacOS) or open the PDF in my Chrome Browser.
and
The origin of the input pdf is that I created it in Preview (on MacOS) by mixing pages from different PDFs and dragging image files into the thumbnails as per these instructions: https://support.apple.com/en-ca/HT202945 I've never had a problem before while making PDFs like this and even Adobe Acrobat reads the input pdf properly. Only the output pdf is problematic in Acrobat and in printers.
Is this a bug with pypdf or am I doing something wrong ? How can i get the output PDF to be proper in Adobe Acrobat and printers etc ?
The text was updated successfully, but these errors were encountered: