-
Notifications
You must be signed in to change notification settings - Fork 201
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
Consider using PyPDF2 strict=False mode #54
Comments
Could you give the URL of that PPA and share the PDF file with which you get this error ? |
|
If I try to save the PDF without cropping (i.e. no change at all) I get a popup saying "Can't read object stream: Stream has ended unexpectedly" while the console outputs: |
Workaround: Take the PDF, open it in Evince (other PDF viewers may work as well), print to file. Use this file with Pdfarranger: No problems. |
This could be that PyPDF2 bug: py-pdf/pypdf#99. We could try the |
Comments from PyPdf2/pdf.py PdfFileReader:
On another thought, I wonder if we should move away from Pypdf2 altogether and try PyMupdf instead. |
Having MuPDF as new (not python) dependency is not a decision to be taken lightly. PyMuPDF is also swig based and not available in Debian nor Ubuntu. PyPDF2 is only python so easier to manage. |
Yes, of course. I was thinking about that too but did't communicate it, sorry. Looking in another direction, I found out that PyPdf3 is a thing (don't go there, it's dead) and then I seriously had to laugh when the issue there directed me to PyPdf4. After resisting the temptation to create PyPdf5, I had a closer look and while the repository owner "claird" is not very active, there is this other guy "newnone" who has done a lot of work and refactoring. (I guess he works for "claird".) I think its worth keeping an eye on this, maybe it can replace Pypdf2 one day. (Maybe someone can change the title since cropping is not the issue here.) |
This error occurs for me in the ppa version and when built from source on python3 wen saving a one-page pdf which has cropping applied (10% to top and bottom).
The text was updated successfully, but these errors were encountered: