1
DocumentViewer - How to set custom page
Question asked by Juraj Zabatiar - June 8 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.

1 Reply

Reply to Thread
1
Cem Alacayir Replied
June 16 at 11:26 AM
Employee Post
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