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

nameddest is not working with a reference variable - data binding #65

Open
ishanuda opened this issue Jan 25, 2020 · 3 comments
Open

nameddest is not working with a reference variable - data binding #65

ishanuda opened this issue Jan 25, 2020 · 3 comments
Labels
enhancement New feature or request

Comments

@ishanuda
Copy link

ishanuda commented Jan 25, 2020

Hi,
Thanks for the amazing library.

I would like to know about the nameddest

I tried to set the nameddest using a variable, and when I change the variable dynamically, the page does not scroll to the destination.

Note: When loading the first time with setting the nameddest variable, The page scrolls the PDF to the destination.

I think it is not supporting data binding or is it?
or
Am I using the nameddest wrong way?

Feature request:
If it is not supporting data binding, Can you make this to bind a variable and act accordingly when changing the variable dynamically?

Tested on

Angualar 8
"ng2-pdfjs-viewer": "^5.0.5",

Thank you very much

@codehippie1
Copy link
Contributor

@ishanuda As you could see, I have exposed PDFViewerApplication object and its options. This can be used to access internal methods to work with pdf directly.

For example
PDFViewerApplication .PDFLinkService.navigateTo() method can be used to navigate the document with nameddest as a parameter.

Please check the code inside viewer.js to see how this function works in case you are interested.

@ishanuda
Copy link
Author

Hi,
Thank you for the quick reply and the information.

As you suggest I will try with the given solution,
But I would love to see the library supporting the feature so that anyone can use the library without accessing the PDFjs internal API directly.

Regards

@codehippie1
Copy link
Contributor

@ishanuda I would love to add as many features as possible. Since, This is a single author project and I am allocating most of my time in upgrades and bug fixes and implementing features requested by more than one user. If you would like to contribute to the project, let me know, I would be glad to get some help. :-)

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

No branches or pull requests

2 participants