Skip to content

[FIX] base: prevent traceback when merging malformed pdfs#237341

Closed
fw-bot wants to merge 1 commit intoodoo:saas-18.2from
odoo-dev:saas-18.2-17.0-opw-5142961-fix-agr-479826-fw
Closed

[FIX] base: prevent traceback when merging malformed pdfs#237341
fw-bot wants to merge 1 commit intoodoo:saas-18.2from
odoo-dev:saas-18.2-17.0-opw-5142961-fix-agr-479826-fw

Conversation

@fw-bot
Copy link
Copy Markdown
Contributor

@fw-bot fw-bot commented Nov 25, 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

Forward-Port-Of: #234587

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
@robodoo
Copy link
Copy Markdown
Contributor

robodoo commented Nov 25, 2025

Pull request status dashboard

@fw-bot
Copy link
Copy Markdown
Contributor Author

fw-bot commented Nov 25, 2025

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 robodoo added the forwardport This PR was created by @fw-bot label Nov 25, 2025
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>
@robodoo robodoo closed this Nov 28, 2025
@fw-bot fw-bot deleted the saas-18.2-17.0-opw-5142961-fix-agr-479826-fw branch December 5, 2025 20:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

forwardport This PR was created by @fw-bot

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants