DEP: Deprecate support for abbreviations in decode_stream_data#3617
Merged
stefan6419846 merged 2 commits intopy-pdf:mainfrom Jan 27, 2026
Merged
DEP: Deprecate support for abbreviations in decode_stream_data#3617stefan6419846 merged 2 commits intopy-pdf:mainfrom
stefan6419846 merged 2 commits intopy-pdf:mainfrom
Conversation
The inline image abbreviations where previously supported in the
publicly facing `decode_stream_data` function. Doing some analysis
showed that this support was limited:
* Our own code would always map to the "proper" names beforehand, thus
we possibly never tested this variant and it has been incomplete.
* Only abbreviations for the filter names were supported. Already
using `/F` instead of `/Filter` for the filter names itself or
specifying `/DP` instead of `/DecodeParams` would fail, as well as
all other keys from table 91 and 92 of the PDF 2.0 specification.
With this in mind, only external API users might have used this API in
the full manner, although we never seem to have received specific
reports about the not supported/mapped parameters. Thus, deprecating the
abbreviations specific to inline images in this generic function seems
like the best way to move forward.
While I was working on this to analyze the current behavior, I wrote
some basic inline image tests for the previously unsupported filter
abbreviations CCF and DCT (at least in `decode_stream_data`). The new
abbreviations were added for completeness (although deprecated
directly), showing that using `PageObject.images` never errored out or
would run into the deprecation now due to proper mapping in our own
code.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3617 +/- ##
=======================================
Coverage 97.36% 97.36%
=======================================
Files 55 55
Lines 9835 9845 +10
Branches 1798 1798
=======================================
+ Hits 9576 9586 +10
Misses 153 153
Partials 106 106 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
stefan6419846
added a commit
that referenced
this pull request
Feb 8, 2026
## What's new ### Deprecations (DEP) - Deprecate support for abbreviations in decode_stream_data (#3617) by @stefan6419846 ### New Features (ENH) - Add ability to add font resources for 14 Adobe Core fonts in text widget annotations (#3624) by @PJBrs ### Bug Fixes (BUG) - Avoid invalid load for ICCBased FlateDecode images in mode 1 (#3619) by @stefan6419846 ### Robustness (ROB) - Fix AESV2 decryption when /Length missing in encrypt dict (#3629) by @dmitry-kostin - Fix merging when annotations point to NullObject (#3613) by @stefan6419846 - Check for `self._info` being None in `compress_identical_objects` (#3612) by @stefan6419846 [Full Changelog](6.6.2...6.7.0)
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.
The inline image abbreviations were previously supported in the publicly facing
decode_stream_datafunction. Doing some analysis showed that this support was limited:/Finstead of/Filterfor the filter names itself or specifying/DPinstead of/DecodeParamswould fail, as well as all other keys from table 91 and 92 of the PDF 2.0 specification.With this in mind, only external API users might have used this API in the full manner, although we never seem to have received specific reports about the not supported/mapped parameters. Thus, deprecating the abbreviations specific to inline images in this generic function seems like the best way to move forward.
While I was working on this to analyze the current behavior, I wrote some basic inline image tests for the previously unsupported filter abbreviations CCF and DCT (at least in
decode_stream_data). The new abbreviations were added for completeness (although deprecated directly), showing that usingPageObject.imagesnever errored out or would run into the deprecation now due to properly mapping them in our own code.