Search bar overlaying results in mobile

24 views
Skip to first unread message

Kai Brümmer

unread,
Aug 19, 2015, 12:33:39 PM8/19/15
to PDFTron WebViewer
Dear all,

in v1.8 and v2.0 the search bar of the mobile viewer hides the marked result if this is on top of the page. So you need to close the search bar and the toolbar, verify, if this is the result, you were looking for and then open toolbar and search again for the next result.
Would you fix this issue, so that either the full doc is shown below the search bar or it will be move to a position that allows you to see the result?

Thank you in advance.
Regards Kai

Matt Bojey

unread,
Aug 19, 2015, 2:47:35 PM8/19/15
to PDFTron WebViewer
Hi,

You can put this in your config file and the document will shrink when you are searching:

$('#searchButton').on('click', function(){
   
for(var i = 0, max = readerControl.getPageCount(); i < max; i++){
        readerControl
.minZooms[i] = readerControl.minZooms[i] * 0.9;
   
}
    readerControl
.updateCurrentZooms();
    readerControl
.setZoomLevel(readerControl.minZooms[0], true);
});
$
('#searchCancelButton').on('click', function(){
   
for(var i = 0, max = readerControl.getPageCount(); i < max; i++){
        readerControl
.minZooms[i] = readerControl.minZooms[i] / 0.9;
   
}
    readerControl
.updateCurrentZooms();
    readerControl
.setZoomLevel(readerControl.minZooms[0], true);
});

Matt
Reply all
Reply to author
Forward
0 new messages