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

Qtreeview for bookmark #23

Open
noumanyosuf opened this issue Aug 10, 2019 · 2 comments
Open

Qtreeview for bookmark #23

noumanyosuf opened this issue Aug 10, 2019 · 2 comments

Comments

@noumanyosuf
Copy link

This works well.
But what if i dot want to use bookmark by pdf.js and rather i want list of bookmark from pdf.js and want to show in qtreeview. How can that be possible?

@noumanyosuf
Copy link
Author

I just want to know how can pdf.js would interact with the qt.
Like what If i just want to have pdf pdf from js but want to have all other button options and bookmark etc etc from qt?? how will that be possible?

@Archie3d
Copy link
Owner

Yes, this can be done. The navigation menu and previews are shown by the viewer (viewer.html/.js). You may modify the viewer.html to hide items you don't want to see, or hide/show them by modifying DOM with JavaScript.
You can also interact with pdf.js from Qt C++ via the web channel as the qpdfwidget does - by executing JS code in the web context and reading back the result. Check viewer.js how it fetches the list of chapters, and do similar way to extract this info and pass it to Qt via the JS bridge.

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

No branches or pull requests

2 participants