-
Notifications
You must be signed in to change notification settings - Fork 10k
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
Implement core support for named actions, and some viewer functionality #3057
Conversation
Nice work! |
break; | ||
|
||
case 'Find': | ||
PDFFindBar.toggle(); |
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.
I don't think this will work very well with the Firefox extension, since that uses the search UI in the browser.
@Snuffleupagus It most certainly can, if I read your discussion correctly! I was wondering why we didn't do that in the first place. The native findbar is now integrated - how about that? |
I've just updated that PR. If you have time please try it and let me know if you find any issues.
Looks good to me! /botio-windows preview |
From: Bot.io (Windows)ReceivedCommand cmd_preview from @Snuffleupagus received. Current queue size: 0 Live output at: http://107.22.172.223:8877/a6ec82fe012b53d/output.txt |
From: Bot.io (Windows)SuccessFull output at http://107.22.172.223:8877/a6ec82fe012b53d/output.txt Total script time: 0.25 mins Published |
|
||
case 'Find': | ||
if (PDFView.supportsIntegratedFind) { | ||
FirefoxCom.request('toggleFindBar'); |
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.
Let's remove 'toggleFindBar' portion and keep only for PDFFindBar. Let's not affect something outside pdf.js for now. You can open separate issue to follow up on this later if you want.
Looks good without PdfStreamConverter.js changes and rebased to new master. |
@yurydelendik Rebased, and refactored. Named actions aren't common, so I'm not sure whether we should support it, but it's little code to put in/remove |
/botio-windows preview |
From: Bot.io (Windows)ReceivedCommand cmd_preview from @yurydelendik received. Current queue size: 0 Live output at: http://107.22.172.223:8877/605bbc0a76372f6/output.txt |
From: Bot.io (Windows)SuccessFull output at http://107.22.172.223:8877/605bbc0a76372f6/output.txt Total script time: 0.35 mins Published |
|
||
case 'GoBack': | ||
PDFHistory.back(); | ||
// TODO implement |
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.
Remove TODO
Good to go with comments above addressed |
Resolved by #3557 |
This PR implements core support for Named Actions (just recognizing them, instead of discarding them), described in the PDF reference, section 8.5
Furthermore I've implemented some of the most used Named Actions (non are standardized to my knowledge). Adobe, implements almost all of their menu items, but I've implemented the following:
GoToPage
: Focuses the page input elementFind
: Toggles the search panelNextPage
,PrevPage
,FirstPage
andLastPage
This also implements a
FirefoxCom
action calledtoggleFindBar
- which toggles the find bar.Fixes #3030