Skip to content
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

Closed
wants to merge 1 commit into from

Conversation

saebekassebil
Copy link
Contributor

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 element
  • Find: Toggles the search panel
  • NextPage, PrevPage, FirstPage and LastPage

This also implements a FirefoxCom action called toggleFindBar - which toggles the find bar.

Fixes #3030

@Snuffleupagus
Copy link
Collaborator

Nice work!
I'm not that familiar with Named Actions, but regarding destination history: can the work I'm doing in #2921 be of help here?

break;

case 'Find':
PDFFindBar.toggle();
Copy link
Collaborator

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.

@saebekassebil
Copy link
Contributor Author

@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?

@Snuffleupagus
Copy link
Collaborator

@Snuffleupagus It most certainly can, if I read your discussion correctly! I was wondering why we didn't do that in the first place.

I've just updated that PR. If you have time please try it and let me know if you find any issues.

The native findbar is now integrated - how about that?

Looks good to me!

/botio-windows preview

@pdfjsbot
Copy link

pdfjsbot commented Apr 7, 2013

From: Bot.io (Windows)


Received

Command cmd_preview from @Snuffleupagus received. Current queue size: 0

Live output at: http://107.22.172.223:8877/a6ec82fe012b53d/output.txt

@pdfjsbot
Copy link

pdfjsbot commented Apr 7, 2013


case 'Find':
if (PDFView.supportsIntegratedFind) {
FirefoxCom.request('toggleFindBar');
Copy link
Contributor

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.

@yurydelendik
Copy link
Contributor

Looks good without PdfStreamConverter.js changes and rebased to new master.

@saebekassebil
Copy link
Contributor Author

@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

@yurydelendik
Copy link
Contributor

/botio-windows preview

@pdfjsbot
Copy link

pdfjsbot commented Jun 4, 2013

From: Bot.io (Windows)


Received

Command cmd_preview from @yurydelendik received. Current queue size: 0

Live output at: http://107.22.172.223:8877/605bbc0a76372f6/output.txt

@pdfjsbot
Copy link

pdfjsbot commented Jun 4, 2013


case 'GoBack':
PDFHistory.back();
// TODO implement
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove TODO

@yurydelendik
Copy link
Contributor

Good to go with comments above addressed

@yurydelendik
Copy link
Contributor

Resolved by #3557

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Somewhat problematic PDF
4 participants