Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
'Activity.LoadLayout("Layout1")
Log("CopyFile()")
If Not(File.Exists(File.DirRootExternal, "hm.pdf")) Then
Log("test.pdf does not exist at DirRootExternal")
File.Copy(File.DirAssets, "hm.pdf", File.DirRootExternal, "hm.pdf")
Log("hm.pdf copied")
End If
pdf.init
Activity.AddView(pdf,0,0,-1,-1)
pdf.getpdf2(File.Combine(File.DirRootExternal,"hm.pdf"),"")
If pdf.isValid Then
Log("pagecount:"&pdf.GetPageCount)
pdf.scrollToPage(0)
pc=pdf.GetPageCount
pdf.zoom(1.0)
Sleep(0)
pdf.scrollToPage(4)
End If
End Sub