I am currently replacing the current PDF viewer in our webviewer application with PDFTron WebViewer 7.x. Initial goal is to replace the viewer with preservation of the current functionality as much as possible.
The current PDF viewer has an option to jump to the first, last and a specific page number.
Is it possible to change the pageNavOverlay in such a way or to add these to the Headeritems ?
I only documentation how to add custom buttons to the headeritems, but no form fields.
Great! That helped me out with the skip to first and last page buttons. We will wait for release 8 for the expansion of the header functions.
I little note about using the img key when pushing actionButton objects to the header.
When an img path is specified it should always be specified relative to the WebViewer assets/icons/ folder. e.g. you need to specify a path to a file in your projects path using ../../assets/myicon.svg
Actionbutton images specified with a path are also not wrapped in a div with class Icon, so the styling deviates from the generic PDFTron styling.
## Actionbutton with embedded svg
<button class="Button ActionButton" aria-label="Naar eersta pagina">
<div class="Icon "><svg xmlns="http://www.w3.org/2000/svg" ...</svg>
## Actionbutton with image path to svg
<button class="Button ActionButton" aria-label="Naar laatste pagina">
Svg-icons which are groups and not paths will deviate from the default PDFtron styling. The orignal (svg-)icons color will be used and not the --icon-color css style.
So icons should always be ungrouped and converted to a path. Easiest and free way to do this is in Inscape, then minify is using SVGO.