qpdf icon indicating copy to clipboard operation
qpdf copied to clipboard

Qtreeview for bookmark

Open noumanyosuf opened this issue 4 years ago • 2 comments

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 avatar Aug 10 '19 14:08 noumanyosuf

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?

noumanyosuf avatar Aug 10 '19 14:08 noumanyosuf

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.

Archie3d avatar Aug 11 '19 11:08 Archie3d