-
Notifications
You must be signed in to change notification settings - Fork 1.5k
ENH: Add page-level actions #3382
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
Open
j-t-1
wants to merge
17
commits into
py-pdf:main
Choose a base branch
from
j-t-1:javascript
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
25550a1
ENH: Add page-level actions
j-t-1 98608ae
Fix errors.
j-t-1 19a527a
Fix more errors.
j-t-1 769ccc4
Fix some more errors.
j-t-1 ac16b2b
Add trailing newline
j-t-1 d90407c
Fix incompatible type "str", expected "bytes" error
j-t-1 f7679e7
Update to use NameObject directly
j-t-1 06b31d2
Fix errors.
j-t-1 2f5b28a
Fix error
j-t-1 884de23
Merge branch 'main' into javascript
j-t-1 0ce99e7
Use a Literal type
j-t-1 bcd4ae3
Use double quotes
j-t-1 3bdf63b
Merge branch 'main' into javascript
stefan6419846 6512658
Change function name, to make it generalizable
j-t-1 533e4f5
Make function extensible for future action types
j-t-1 444ea7e
Fix errors
j-t-1 925f68e
Increase readability
j-t-1 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These limitations still sound like we should further refine the public API.
add_action
should add the new action in a defined manner, not overwrite existing ones - especially when the specification supports having both events defined on the page, but our API design only allows one.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this needs to be robust; and extensible to the many action types. May be worth posting as a discussion to get ideas.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can of course open a discussion, but with JavaScript being ignored by many PDF readers and (at least from my experience) limited adoption, I guess there will not be much feedback.
This is one of the reasons why we usually ask to open issues first to discuss new APIs, although we might have missed this there as well and additional feedback would most likely have been sparse as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, feedback and demand may be limited. Although this is initially for JavaScript, it will be extensible and generic for other action types. The many and varied action types means this is a route to upgrading the interactive features that pypdf can provide.