BUG: Fix stream position on inline image fallback extraction#3120
Merged
stefan6419846 merged 2 commits intopy-pdf:mainfrom Feb 12, 2025
Merged
BUG: Fix stream position on inline image fallback extraction#3120stefan6419846 merged 2 commits intopy-pdf:mainfrom
stefan6419846 merged 2 commits intopy-pdf:mainfrom
Conversation
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
Codecov ReportAll modified and coverable lines are covered by tests ✅
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. 🚀 New features to boost your workflow:
|
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)
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.
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