[FIX] base: prevent traceback when merging malformed pdfs#237341
Closed
fw-bot wants to merge 1 commit intoodoo:saas-18.2from
Closed
[FIX] base: prevent traceback when merging malformed pdfs#237341fw-bot wants to merge 1 commit intoodoo:saas-18.2from
fw-bot wants to merge 1 commit intoodoo:saas-18.2from
Conversation
Currently some PDFs cause error in PyPDF (Version 1 and 2) and cannot be merged. Steps to reproduce: - Create 2+ Bills with specific PDF (example found in ticket) - From Bills list view, select both and click Download > Original bills Issue: Traceback will raise `PyPDF2.errors.PdfReadError: Can't read object stream: Stream has ended unexpectedly` Thsi occurs because the version of PyPDF currently in use (2.12.1) cannot recover when working an odd PDF file having wrong length markers. This commit will add a nice error explaining to user what's going on. opw-5142961 X-original-commit: 49ffca5
Contributor
Contributor
Author
|
This PR targets saas-18.2 and is part of the forward-port chain. Further PRs will be created up to master. More info at https://github.com/odoo/odoo/wiki/Mergebot#forward-port |
robodoo
pushed a commit
that referenced
this pull request
Nov 28, 2025
Currently some PDFs cause error in PyPDF (Version 1 and 2) and cannot be merged. Steps to reproduce: - Create 2+ Bills with specific PDF (example found in ticket) - From Bills list view, select both and click Download > Original bills Issue: Traceback will raise `PyPDF2.errors.PdfReadError: Can't read object stream: Stream has ended unexpectedly` Thsi occurs because the version of PyPDF currently in use (2.12.1) cannot recover when working an odd PDF file having wrong length markers. This commit will add a nice error explaining to user what's going on. opw-5142961 closes #237341 X-original-commit: 49ffca5 Signed-off-by: Rémy Voet (ryv) <ryv@odoo.com> Signed-off-by: Andrea Grazioso (agr) <agr@odoo.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Currently some PDFs cause error in PyPDF (Version 1 and 2) and cannot be merged.
Steps to reproduce:
Issue:
Traceback will raise
PyPDF2.errors.PdfReadError: Can't read object stream: Stream has ended unexpectedlyThsi occurs because the version of PyPDF currently in use (2.12.1) cannot recover when working an odd PDF file having wrong length markers.
This commit will add a nice error explaining to user what's going on.
opw-5142961
Forward-Port-Of: #234587