B4i Library [class] PDFView

Untested code, add to the class:
Code: Copy
Public Sub GetPageCount As Int
    Return Document.RunMethod("pageCount", Null).AsNumber
End Sub

'PageIndex is 0 based.
Public Sub GoToPage(PageIndex As Int)
    Dim page As NativeObject = Document.RunMethod("pageAtIndex:", Array(PageIndex))
    PDFView1.As(NativeObject).RunMethod("goToPage:", Array(page))
End Sub
 
Last edited:
Untested code, add to the class:
Code: Copy
Public Sub GetPageCount As Int
    Return Document.RunMethod("pageCount", Null).AsNumber
End Sub

Public Sub GoToPage(PageIndex As Int)
    Dim page As NativeObject = Document.RunMethod("pageAtIndex:", Array(PageIndex))
    PDFView1.As(NativeObject).RunMethod("goToPage:", Array(page))
End Sub
It works
Thank you
 
Back
Top