Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2019
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.96 KB | None | 0 0
  1. 09-10 22:02:35.936: E/AndroidRuntime(556): FATAL EXCEPTION: main
  2. 09-10 22:02:35.936: E/AndroidRuntime(556): java.lang.UnsatisfiedLinkError: parseFile
  3. 09-10 22:02:35.936: E/AndroidRuntime(556): at cx.hell.android.pdfviewIktab.PDF.parseFile(Native Method)
  4. 09-10 22:02:35.936: E/AndroidRuntime(556): at cx.hell.android.pdfviewIktab.PDF.<init>(PDF.java:87)
  5. 09-10 22:02:35.936: E/AndroidRuntime(556): at cx.hell.android.pdfviewIktab.OpenFileActivity.getPDF(OpenFileActivity.java:569)
  6. 09-10 22:02:35.936: E/AndroidRuntime(556): at cx.hell.android.pdfviewIktab.OpenFileActivity.startPDF(OpenFileActivity.java:530)
  7. 09-10 22:02:35.936: E/AndroidRuntime(556): at cx.hell.android.pdfviewIktab.OpenFileActivity.onCreate(OpenFileActivity.java:282)
  8. 09-10 22:02:35.936: E/AndroidRuntime(556): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
  9. 09-10 22:02:35.936: E/AndroidRuntime(556): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
  10. 09-10 22:02:35.936: E/AndroidRuntime(556): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
  11. 09-10 22:02:35.936: E/AndroidRuntime(556): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
  12. 09-10 22:02:35.936: E/AndroidRuntime(556): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
  13. 09-10 22:02:35.936: E/AndroidRuntime(556): at android.os.Handler.dispatchMessage(Handler.java:99)
  14. 09-10 22:02:35.936: E/AndroidRuntime(556): at android.os.Looper.loop(Looper.java:123)
  15. 09-10 22:02:35.936: E/AndroidRuntime(556): at android.app.ActivityThread.main(ActivityThread.java:4627)
  16. 09-10 22:02:35.936: E/AndroidRuntime(556): at java.lang.reflect.Method.invokeNative(Native Method)
  17. 09-10 22:02:35.936: E/AndroidRuntime(556): at java.lang.reflect.Method.invoke(Method.java:521)
  18. 09-10 22:02:35.936: E/AndroidRuntime(556): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
  19. 09-10 22:02:35.936: E/AndroidRuntime(556): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
  20. 09-10 22:02:35.936: E/AndroidRuntime(556): at dalvik.system.NativeStart.main(Native Method)
  21.  
  22. package cx.hell.android.pdfviewIktab;
  23.  
  24. import java.io.File;
  25. import java.io.FileDescriptor;
  26. import java.util.List;
  27. import cx.hell.android.lib.pagesview.FindResult;
  28.  
  29.  
  30. public class PDF {
  31. static {
  32. System.loadLibrary("pdfview2");
  33. }
  34.  
  35.  
  36. public static class Size implements Cloneable {
  37. public int width;
  38. public int height;
  39.  
  40. public Size() {
  41. this.width = 0;
  42. this.height = 0;
  43. }
  44.  
  45. public Size(int width, int height) {
  46. this.width = width;
  47. this.height = height;
  48. }
  49.  
  50. public Size clone() {
  51. return new Size(this.width, this.height);
  52. }
  53. }
  54.  
  55.  
  56. private int pdf_ptr = -1;
  57. private int invalid_password = 0;
  58.  
  59. public boolean isValid() {
  60. return pdf_ptr != 0;
  61. }
  62.  
  63. public boolean isInvalidPassword() {
  64. return invalid_password != 0;
  65. }
  66.  
  67. synchronized private native int parseFile(String fileName, int box, String password);
  68.  
  69. synchronized private native int parseFileDescriptor(FileDescriptor fd, int box, String password);
  70.  
  71. public PDF(File file, int box) {
  72.  
  73. // this is the line of (cx.hell.android.pdfviewIktab.OpenFileActivity.getPDF(OpenFileActivity.java:569))
  74. this.parseFile(file.getAbsolutePath(), box, "");
  75. }
  76.  
  77. public PDF(FileDescriptor file, int box) {
  78. this.parseFileDescriptor(file, box, "");
  79. }
  80.  
  81. synchronized public native int getPageCount();
  82.  
  83. synchronized public native int[] renderPage(int n, int zoom, int left, int top,
  84. int rotation, boolean gray, boolean skipImages, PDF.Size rect);
  85.  
  86. synchronized public native int getPageSize(int n, PDF.Size size);
  87.  
  88. synchronized public native List<FindResult> find(String text, int page);
  89.  
  90. synchronized public native void clearFindResult();
  91.  
  92. synchronized public native List<FindResult> findOnPage(int page, String text);
  93.  
  94. synchronized private native void freeMemory();
  95.  
  96. public void finalize() {
  97. try {
  98. super.finalize();
  99. } catch (Throwable e) {
  100. }
  101. this.freeMemory();
  102. }
  103. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement