Skip to content
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

ROB: MissingWidth is IndirectObject #2288

Merged
merged 3 commits into from
Nov 14, 2023
Merged

ROB: MissingWidth is IndirectObject #2288

merged 3 commits into from
Nov 14, 2023

Conversation

MartinThoma
Copy link
Member

@MartinThoma MartinThoma commented Nov 9, 2023

Fixes #2286

Copy link

codecov bot commented Nov 9, 2023

Codecov Report

Attention: 5 lines in your changes are missing coverage. Please review.

Comparison is base (e11c2b6) 94.45% compared to head (c84f841) 94.39%.
Report is 2 commits behind head on main.

Files Patch % Lines
pypdf/_cmap.py 16.66% 4 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2288      +/-   ##
==========================================
- Coverage   94.45%   94.39%   -0.07%     
==========================================
  Files          43       43              
  Lines        7651     7654       +3     
  Branches     1511     1513       +2     
==========================================
- Hits         7227     7225       -2     
- Misses        262      266       +4     
- Partials      162      163       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@pubpub-zz pubpub-zz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NullObject should also be considered

pypdf/_cmap.py Outdated Show resolved Hide resolved
pypdf/_cmap.py Outdated Show resolved Hide resolved
MartinThoma and others added 2 commits November 14, 2023 07:39
Co-authored-by: pubpub-zz <4083478+pubpub-zz@users.noreply.github.com>
Co-authored-by: pubpub-zz <4083478+pubpub-zz@users.noreply.github.com>
@MartinThoma
Copy link
Member Author

@pubpub-zz Thank you!

I really hope that we find a more principal way to deal with those kinds of issues some day. Pretty much every PDF attribute might be missing / indirect / NullObject, even if the standard does not allow it.

@MartinThoma MartinThoma merged commit 9a2d983 into main Nov 14, 2023
12 of 14 checks passed
@MartinThoma MartinThoma deleted the issue-2286 branch November 14, 2023 07:29
MartinThoma added a commit that referenced this pull request Nov 14, 2023
## What's new

### Bug Fixes (BUG)
-  Mediabox expansion size when applying non-right angle rotation (#2282) by @MrinalJain17

### Robustness (ROB)
-  MissingWidth is IndirectObject (#2288) by @MartinThoma
-  Initialize states array with an empty value (#2280) by @alexey-v-paramonov

### Documentation (DOC)
-  Typo in example in extract-attachments.md (#2285) by @ageitgey
-  Add Alexey Paramonov as a contributor for #2280 by @MartinThoma

### Maintenance (MAINT)
-  Update sample-files by @MartinThoma

[Full Changelog](3.17.0...3.17.1)
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.

TypeError while loading some documents, caused by _cmap.py, line 93
2 participants