1
DocumentViewer - How to set custom page
Question asked by Juraj Zabatiar - 6/8/2017 at 1:20 AM
Answered
Hello. Is there a native way to define a page when document loaded? By default is document opened on first page.

2 Replies

Reply to Thread
0
Juraj Zabatiar Replied
i have found this client-side solution only.

function OnDocumentLoad(e, sender) {
e.setCurrentPageNumber(myPage)
};
1
Cem Alacayir Replied
Employee Post Marked As Answer
Yes, what you found is correct, currently it can be done only inside ClientLoad event. For future reference:
 
<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.setCurrentPageNumber(myPage)
    }
</script>
 
 

Reply to Thread