-
Notifications
You must be signed in to change notification settings - Fork 1.5k
ENH: Parse and format comb fields in text widget annotations #3519
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
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3519 +/- ##
=======================================
Coverage 97.14% 97.14%
=======================================
Files 57 57
Lines 9792 9807 +15
Branches 1775 1780 +5
=======================================
+ Hits 9512 9527 +15
Misses 168 168
Partials 112 112 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This patch implements comb-formatted appearance streams.
|
@stefan6419846 Thanks for your review! One question - can you have a look at the doc strings? I hope my solution for how to describe the formatting_kwargs variable is OK. Also, I suppose I could add a link to the TextStreamAppearance class to the list of classes under API in the documentation, but I don't know how (yet). |
Sorry, there has been a misunderstanding here. Please keep the old approach, but pass all parameters as named ones instead of positional ones (id est use
Is this class really relevant for the pypdf user? We should only include functionality in the official docs which are public and can actually be passed by the user. For me, TextAppearanceStream rather is an internal API for us. |
…lists" This reverts commit cf2b174.
…onal Two methods in the TextStreamAppearance have rather long lists of arguments: __init__() and _generate_appearance_stream_data(). This patch passes all arguments directly related to formatting as named arguments instead of as positional arguments, to increase code clarity and reduce chances of errors.
|
@stefan6419846 Now I understand better, thanks for the explanation! No reason, I think, to add the current class to the API documentation. Should be ready for review! |
## What's new ### Security (SEC) - Reduce default limit for LZW decoding by @stefan6419846 ### New Features (ENH) - Parse and format comb fields in text widget annotations (#3519) by @PJBrs ### Robustness (ROB) - Silently ignore Adobe Ascii85 whitespace for suffix detection (#3528) by @mbierma [Full Changelog](6.3.0...6.4.0)
This PR adds support for parsing Comb fields in text widget annotations.
Closes #2153