B4i Library [class] PDFView

Erel

B4X founder
Staff member
Licensed User
Longtime User
Untested code, add to the class:
B4X:
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:

Kadandale Ganapathy Bhat

Member
Licensed User
Untested code, add to the class:
B4X:
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
 
Top