1
Set maximum or default initial zoom
Question asked by Adam Tsiopani - 6/14/2017 at 10:58 PM
Answered
I have the document viewer in a large container. When it loads, it defaults the zoom of the document to fit the width of the container e.g. 150%
 
How can I configure DocumentUltimate to set the initial maximum zoom to 100%?
 
Thanks,
Adam.

1 Reply

Reply to Thread
1
Cem Alacayir Replied
Employee Post Marked As Answer
You can do it easily like this:
 
<GleamTech:DocumentViewer ID="documentViewer" runat="server" 
        Width="800" 
        Height="600" 
        Resizable="True" 
        ClientLoad="documentViewerLoad" />
        
        
<script type="text/javascript">
    function documentViewerLoad(sender, e) { 
        var documentViewer = sender; //sender parameter will be the DocumentViewer instance

        documentViewer.setZoomLevel(1); // Set zoom to 100%
    }
</script>
 
Alternative methods that adjust view:
 
documentViewer.fitPage(); // Adjust page so that both width and height fits the view

documentViewer.fitWidth(); // Default behaviour
 
 

Reply to Thread