qpdf
qpdf copied to clipboard
Qtreeview for bookmark
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?
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?
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.