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

BUG: Fix stream position on inline image fallback extraction #3120

Merged
merged 2 commits into from
Feb 12, 2025

Conversation

stefan6419846
Copy link
Collaborator

When fixing the inline image extraction in #3002, the fallback behavior would break accidentally by leaving the stream before the EI marker. We never saw this due to the tests somehow being not strict enough, thus leading to the error

b'EI' operator met whereas not expected, please share usecase with pypdf dev team

When fixing the inline image extraction in py-pdf#3002, the fallback behavior
would break accidentally by leaving the stream before the EI marker.
We never saw this due to the tests somehow being not strict enough, thus
leading to the error

> b'EI' operator met whereas not expected, please share usecase with pypdf dev team
@stefan6419846 stefan6419846 added is-bug From a users perspective, this is a bug - a violation of the expected behavior with a compliant PDF workflow-images From a users perspective, image handling is the affected feature/workflow is-regression Regression introduced as a side-effect of another change labels Feb 12, 2025
Copy link

codecov bot commented Feb 12, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.51%. Comparing base (2263dcb) to head (e203a20).
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3120   +/-   ##
=======================================
  Coverage   96.51%   96.51%           
=======================================
  Files          53       53           
  Lines        8873     8875    +2     
  Branches     1622     1622           
=======================================
+ Hits         8564     8566    +2     
  Misses        185      185           
  Partials      124      124           

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

@stefan6419846 stefan6419846 merged commit be414c1 into py-pdf:main Feb 12, 2025
16 checks passed
@stefan6419846 stefan6419846 deleted the ei-on-fallback branch February 12, 2025 13:22
stefan6419846 added a commit that referenced this pull request Mar 2, 2025
## What's new

### Bug Fixes (BUG)
- Use the correct name StandardEncoding for the predefined cmap (#3156) by @stefan6419846
- Handle inline images containing `EI ` sequences (#3152) by @stefan6419846
- Fix check box value which should be name object (#3124) by @stefan6419846
- Fix stream position on inline image fallback extraction (#3120) by @stefan6419846
- Fix object count for incremental writer (#3117) by @m32

### Robustness (ROB)
- Avoid index errors on empty lines in xref table (#3162) by @stefan6419846
- Improve handling of LZW decoder table overflow (#3159) by @stefan6419846
- Ignore non-numbers for width when building font width map (#3158) by @stefan6419846
- Avoid negative seek values when reading partially broken files (#3157) by @stefan6419846

### Documentation (DOC)
- Fixed PageObject.images example usage for replacing image (#3149) by @jutoth

[Full Changelog](5.3.0...5.3.1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
is-bug From a users perspective, this is a bug - a violation of the expected behavior with a compliant PDF is-regression Regression introduced as a side-effect of another change workflow-images From a users perspective, image handling is the affected feature/workflow
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant