Hello to all
I'm trying the PDF Viewer library
I find this error
thank you
I'm trying the PDF Viewer library
I find this error
thank you
B4X:
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
End Sub
Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Dim pdf As PDFViewer
'Dim PDF2 As PDFRenderer
Dim i,pc As Int=0
Dim iv
End Sub
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, "test.pdf")) Then
Log("test.pdf does not exist at DirRootExternal")
File.Copy(File.DirAssets, "test.pdf", File.DirRootExternal, "test.pdf")
Log("test.pdf copied")
End If
pdf.init
Activity.AddView(pdf,0,0,-1,-1)
pdf.getpdf2(File.Combine(File.DirRootExternal,"test.pdf"),"")
If pdf.isValid Then
Log("pagecount:"&pdf.GetPageCount)
pdf.scrollToPage(0)
pc=pdf.GetPageCount
pdf.zoom(19.0)
Else
Msgbox("Error pdf file!","Error")
'Activity.Finish
'Return
End If
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
CopyFile()
java.lang.UnsatisfiedLinkError: dlopen failed: "/data/data/b4a.example.pdfviewer/files/libpdfview2.so" has unexpected e_machine: 40
at java.lang.Runtime.load0(Runtime.java:908)
at java.lang.System.load(System.java:1505)
at ice.pdfviewer.pdfviewerwrapper.init(pdfviewerwrapper.java:109)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.shell.Shell.runVoidMethod(Shell.java:755)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:345)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:249)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:139)
at b4a.example.pdfviewer.main.afterFirstLayout(main.java:102)
at b4a.example.pdfviewer.main.access$000(main.java:17)
at b4a.example.pdfviewer.main$WaitForLayout.run(main.java:80)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6119)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
** Activity (main) Resume **
An error occurred:
(Line: 44) Activity.AddView(pdf,0,0,-1,-1)
java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Boolean
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
CopyFile()
java.lang.UnsatisfiedLinkError: dlopen failed: "/data/data/b4a.example.pdfviewer/files/libpdfview2.so" has unexpected e_machine: 40
at java.lang.Runtime.load0(Runtime.java:908)
at java.lang.System.load(System.java:1505)
at ice.pdfviewer.pdfviewerwrapper.init(pdfviewerwrapper.java:109)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.shell.Shell.runVoidMethod(Shell.java:755)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:345)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:249)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:139)
at b4a.example.pdfviewer.main.afterFirstLayout(main.java:102)
at b4a.example.pdfviewer.main.access$000(main.java:17)
at b4a.example.pdfviewer.main$WaitForLayout.run(main.java:80)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6119)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
** Activity (main) Resume **
An error occurred:
(Line: 44) Activity.AddView(pdf,0,0,-1,-1)
java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Boolean