-
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 PdfWriter.open_destination property #1431
Conversation
fixes py-pdf#1425 and py-pdf#482 Also Introduces a new API opening in order to open a doc on a page or destination
Codecov ReportBase: 94.25% // Head: 94.31% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #1431 +/- ##
==========================================
+ Coverage 94.25% 94.31% +0.06%
==========================================
Files 28 28
Lines 5096 5171 +75
Branches 973 980 +7
==========================================
+ Hits 4803 4877 +74
Misses 177 177
- Partials 116 117 +1
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
@pubpub-zz Is the new |
In general I prefer PRs which deal with a single issue. This makes it way easier for me to merge a PR as I only have to check one thing at a time. |
I've introduced the |
I think splitting would be nice 🙏 I'm uncertain about the naming |
any ideas another name for opening ? |
If you want to make According to
Why is the I'm sorry if I ask dumb questions; I know way less about PDF than you 😅 |
I dislike the idea of calling it open_action as actually the JS actions are now executed from other Names/JavaScript.
You can define named destinations. Even if not in the PDF standard it works (I was also doubtfull about it😉). For the getter I've prefered to keep the name instead of the actual destination for users to not believe that something has been modified I've extracted the fix on in another PR |
Waiting for #1439 to be merged before updating this one |
@MartinThoma |
@MasterOdin What do you think about newly added |
Personally, I feel like calling it I do think it's fine to add this property, even if it's not really one that's often used given it is in the PDF spec (see Table 28 in 7.7.2). |
The point is that this property is not dealing with any action/script. What about |
Co-authored-by: Matthew Peveler <matt.peveler@gmail.com>
Co-authored-by: Matthew Peveler <matt.peveler@gmail.com>
|
@MartinThoma |
Thank you @pubpub-zz for putting that much work again in this PR ❤️ And thank you @MasterOdin for the thorough review 🤗 |
New Features (ENH): - Add support to extract gray scale images (#1460) - Add 'threads' property to PdfWriter (#1458) - Add 'open_destination' property to PdfWriter (#1431) - Make PdfReader.get_object accept integer arguments (#1459) Bug Fixes (BUG): - Scale PDF annotations (#1479) Robustness (ROB): - Padding issue with AES encryption (#1469) - Accept empty object as null objects (#1477) Documentation (DOC): - Add module documentation the PaperSize class (#1447) Maintenance (MAINT): - Use 'page_number' instead of 'pagenum' (#1365) - Add List of pages to PageRangeSpec (#1456) Testing (TST): - Cleanup temporary files (#1454) - Mark test_tounicode_is_identity as external (#1449) - Use Ubuntu 20.04 for running CI test suite (#1452) [Full Changelog](2.11.2...2.12.0)
(fix JS executed twice extracted in another PR)
add capability to define an opening destination for the PDF