Limit the zoom level

57 views
Skip to first unread message

Matt Parizeau

unread,
Sep 12, 2014, 8:15:12 PM9/12/14
to pdfnet-w...@googlegroups.com
Q:

Is there a way to set the high/low limits on the zoom for the WebViewer? We would not like it to go less than 10%.

A:

The quickest way would me to modify ReaderControl.js and change MIN_ZOOM at the top of the file to 0.1. If you want to make the change without modifying ReaderControl.js then you could have this instead:

$(document).on('viewerLoaded', function() {
    readerControl
.setZoomLevel = function(zoom) {
       
if (zoom < 0.1) {
            zoom
= 0.1;
       
}

        readerControl
.docViewer.ZoomTo(zoom);
   
}
});

Reply all
Reply to author
Forward
0 new messages