Updating toolbar icons from WebViewer 1.7

40 views
Skip to first unread message

Matt Parizeau

unread,
Sep 23, 2016, 8:33:27 PM9/23/16
to PDFTron WebViewer
Q:

We have been using WebViewer 1.7 and have replaced the toolbar icon files with our own. We'd like to use the same image files in the latest WebViewer's toolbar. Is that possible?

A:

If you want to replace the new icons then one option is to dynamically replace the elements in the toolbar with new elements that have the image you want. For example this would replace the previous page button:
var prevPageButton = $('<div id="prevPage"><img src="/reverse_green.png"></div>');
prevPageButton.css({
  // add styles here
});
$('#prevPage').replaceWith(prevPageButton);


Alternatively you could modify MobileReaderControl.html so that your own html elements are there instead. Or you could hide the toolbar (set showToolbarControl false https://www.pdftron.com/webviewer/demo/doc/symbols/PDFTron.WebViewer.Options.html#showToolbarControl) and create your own with your own buttons.

Reply all
Reply to author
Forward
0 new messages