Skip to content

ROB: Fix merge_page for pages without resources#1349

Merged
MartinThoma merged 1 commit intopy-pdf:mainfrom
pubpub-zz:iss270
Sep 17, 2022
Merged

ROB: Fix merge_page for pages without resources#1349
MartinThoma merged 1 commit intopy-pdf:mainfrom
pubpub-zz:iss270

Conversation

@pubpub-zz
Copy link
Copy Markdown
Collaborator

closes #270

@codecov
Copy link
Copy Markdown

codecov bot commented Sep 15, 2022

Codecov Report

Base: 94.63% // Head: 94.67% // Increases project coverage by +0.04% 🎉

Coverage data is based on head (17ec41e) compared to base (7c96d13).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1349      +/-   ##
==========================================
+ Coverage   94.63%   94.67%   +0.04%     
==========================================
  Files          30       30              
  Lines        5140     5146       +6     
  Branches     1058     1058              
==========================================
+ Hits         4864     4872       +8     
  Misses        164      164              
+ Partials      112      110       -2     
Impacted Files Coverage Δ
PyPDF2/_page.py 94.80% <100.00%> (+0.40%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@MartinThoma MartinThoma changed the title ROB : fix merge_page for pages without resources ROB: Fix merge_page for pages without resources Sep 17, 2022
@MartinThoma MartinThoma merged commit 6f51189 into py-pdf:main Sep 17, 2022
@MartinThoma
Copy link
Copy Markdown
Member

Amazing - you could close one of the oldest issues left 🎉

@pubpub-zz pubpub-zz deleted the iss270 branch September 17, 2022 15:06
MartinThoma added a commit that referenced this pull request Sep 18, 2022
New Features (ENH):
-  Add rotation property and transfer_rotate_to_content (#1348)

Performance Improvements (PI):
-  Avoid string concatenation with large embedded base64-encoded images (#1350)

Bug Fixes (BUG):
-  Format floats using their intrinsic decimal precision (#1267)

Robustness (ROB):
-  Fix merge_page for pages without resources (#1349)

Full Changelog: 2.10.8...2.10.9
samuelhwilliams added a commit to alphagov/notifications-template-preview that referenced this pull request Oct 26, 2022
We've been seeing quite a few KeyError `/Resources` errors lately. This
can happen when pages don't have a `/Resources` key - but in PDFs
missing resources can be inferred from previous pages. This issue was
raised py-pdf/pypdf#1349 and fixed in v2.10.9.

Bumping to this version will stop the app throwing 500s and instead
either complete successfully or return the correct validation error,
which should prevent some users contacting support.

Add a test for PyPDF2 KeyError /Resources
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pages without Resources dictionary

2 participants