-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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: Handle IndirectObject as image filter #2355
BUG: Handle IndirectObject as image filter #2355
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2355 +/- ##
==========================================
+ Coverage 94.47% 94.54% +0.06%
==========================================
Files 43 43
Lines 7564 7547 -17
Branches 1491 1490 -1
==========================================
- Hits 7146 7135 -11
+ Misses 259 253 -6
Partials 159 159 ☔ View full report in Codecov by Sentry. |
I was trying to find a file that reproduces the issue:
I guess you have a private file with which you have tested this? |
This is correct. I might have a look at this again tomorrow to check whether I am able to generate a corresponding test file to demonstrate this and ensure appropriate coverage, so feel free to delay merging this for now. I just opened this PR with the current research state shortly before leaving the office today. |
I trust you. If you have tested this with the file that was failing previously, I would merge. Otherwise I would wait. Did you test it with your private file? |
I just sent you a minimal version of the file in question, while I am not able to make it public and have no public/uncritical alternative version. |
@stefan6419846
Can you tell me if my fix would work for you? |
@pubpub-zz If I am not mistaken, this will not work here without further changes (at least during my tests): |
The CI seems to fail due to the known concurrency issue at the moment. |
The Traceback was:
|
@stefan6419846 Thank you for taking care of this! |
## What's new ### Bug Fixes (BUG) - Handle IndirectObject as image filter (#2355) by @stefan6419846 ### Documentation (DOC) - Quote specs in generate_file_identifiers (#2363) by @exiledkingcc - Notes about form fields and annotations (#1945) by @dmjohnsson23 - Notes about update_page_form_field_values(auto_regenerate) (#2359) by @dmjohnsson23 - Fix stamping example (#2358) by @dmjohnsson23 - Stamp images directly on a PDF (#2357) by @dmjohnsson23 - Correct the example of adding highlight annotation (#2341) by @Tobeabellwether ### Maintenance (MAINT) - Update upload-artifact and download-artifact actions from v3 to v4 (#2352) by @stefan6419846 ### Testing (TST) - Add xfail test for #2336 (#2365) by @MartinThoma - Increase test coverage for flate handling of image mode 1 (#2339) by @stefan6419846 ### Code Style (STY) - File identifier generation restructuring (#2362) by @exiledkingcc - Add PdfWriter._ID attribute (#2361) by @exiledkingcc - Variable naming convention (#2360) by @MartinThoma [Full Changelog](3.17.3...3.17.4)
Hi, i still have issue in 3.17.4 Regards |
Previously, we might pass
"4bits"
as image mode to Pillow, leading to "unrecognized image mode". Example:lfilters = IndirectObject(26, 0, 139771595681120)
, whoseget_object()
would yield['/FlateDecode']
(going into theelse
branch of the filter handling until now).While I have a corresponding document where I stumbled upon this error, I cannot disclose it due to privacy reasons.