-
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
ENH: Add interface to annotations and AnnotationBuilder #1120
Conversation
20953e0
to
b4f9e05
Compare
Codecov Report
@@ Coverage Diff @@
## main #1120 +/- ##
=======================================
Coverage 91.96% 91.96%
=======================================
Files 24 24
Lines 4693 4756 +63
Branches 968 985 +17
=======================================
+ Hits 4316 4374 +58
- Misses 231 232 +1
- Partials 146 150 +4
Continue to review full report at Codecov.
|
@MasterOdin @pubpub-zz I'd be interested in your opinion. What to you think about adding this as an interface for annotations to PyPDF2? |
I completely agree with the approach. Part of my original interest in PyPDF4, was to work on merging comments from different users/source (you may be interested in https://github.com/pubpub-zz/PyPPDF4.sav/tree/master/samplecode ) |
New Features (ENH): - Add writer.add_annotation, page.annotations, and generic.AnnotationBuilder (#1120) Bug Fixes (BUG): - Set /AS for /Btn form fields in writer (#1161) - Ignore if /Perms verify failed (#1157) Robustness (ROB): - Cope with utf16 character for space calculation (#1155) - Cope with null params for FitH / FitV destination (#1152) - Handle outlines without valid destination (#1076) Developer Experience (DEV): - Introduce _utils.logger_warning (#1148) Maintenance (MAINT): - Break up parse_to_unicode (#1162) - Add diagnostic output to exception in read_from_stream (#1159) - Reduce PdfReader.read complexity (#1151) Testing (TST): - Add workflow tests found by arc testing (#1154) - Decrypt file which is not encrypted (#1149) - Test CryptRC4 encryption class; test image extraction filters (#1147) Full Changelog: 2.7.0...2.8.0
page.annotations
(getter and setter)writer.add_annotation(page_number, annotation_dictionary)
annotation_dictionary
for the different subtypes of annotations. Similarly, we could have an AnnotationsParser.See #107
Closes #981