Open Veaer opened 9 years ago
I use version 1.0.4.
And I find it crash when I use pdf version 1.6,1.4 is ok
I see this error in https://github.com/JoanZapata/android-pdfview/issues/49,but it seems that it was not solved.
I have the same problem with you, I don't know how to solve, Have you solved it
08-14 11:13:57.012: E/AndroidRuntime(29182): FATAL EXCEPTION: main 08-14 11:13:57.012: E/AndroidRuntime(29182): Process: com.joanzapata.pdfview.sample, PID: 29182 08-14 11:13:57.012: E/AndroidRuntime(29182): java.lang.RuntimeException: error loading page 08-14 11:13:57.012: E/AndroidRuntime(29182): at org.vudroid.pdfdroid.codec.PdfPage.open(Native Method) 08-14 11:13:57.012: E/AndroidRuntime(29182): at org.vudroid.pdfdroid.codec.PdfPage.createPage(PdfPage.java:55) 08-14 11:13:57.012: E/AndroidRuntime(29182): at org.vudroid.pdfdroid.codec.PdfDocument.getPage(PdfDocument.java:18) 08-14 11:13:57.012: E/AndroidRuntime(29182): at org.vudroid.core.DecodeServiceBase.getPage(DecodeServiceBase.java:175) 08-14 11:13:57.012: E/AndroidRuntime(29182): at org.vudroid.core.DecodeServiceBase.getPageWidth(DecodeServiceBase.java:214) 08-14 11:13:57.012: E/AndroidRuntime(29182): at com.joanzapata.pdfview.PDFView.loadComplete(PDFView.java:648) 08-14 11:13:57.012: E/AndroidRuntime(29182): at com.joanzapata.pdfview.DecodingAsyncTask.onPostExecute(DecodingAsyncTask.java:58) 08-14 11:13:57.012: E/AndroidRuntime(29182): at com.joanzapata.pdfview.DecodingAsyncTask.onPostExecute(DecodingAsyncTask.java:1)
I use version 1.0.4. too
I do not solve this problem.But I use pdf files with version 1.4 replace 1.6.It works.
sorry my english is poor! I can't control the version of the user‘s pdf files. I tried the pdf1.4 files, but it was the same problem.
Faced with many crashes and memory leak issue with this Library. Spend many hours to revive this library. My Recommendation is to go for built in library "android.graphics.pdf.PdfRenderer" it does everything that this library does ( for Api 21 and above). I have used it and its very stable.
https://developer.android.com/reference/android/graphics/pdf/PdfRenderer.html
@ewanrego But it has not zoom or swipe function.
How can solve the problem of the load image of the pdfview?
@danfengfirst big or complex pdf, this library cannot cope, i think.
I'm using another library ---Android-MuPDF git path:[https://github.com/geek5nan/AndroidMuPDFDemo]
I am loading all the pdf files in recyclerview at that time first item able to load and able to see but for the second item I am not able to see and app get crash.
java.lang.RuntimeException: An error occured while executing doInBackground() at android.os.AsyncTask$3.done(AsyncTask.java:304) at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:355) at java.util.concurrent.FutureTask.setException(FutureTask.java:222) at java.util.concurrent.FutureTask.run(FutureTask.java:242) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1115) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:590) at java.lang.Thread.run(Thread.java:818) Caused by: java.lang.RuntimeException: error loading page at org.vudroid.pdfdroid.codec.PdfPage.open(Native Method) at org.vudroid.pdfdroid.codec.PdfPage.createPage(PdfPage.java:55) at org.vudroid.pdfdroid.codec.PdfDocument.getPage(PdfDocument.java:18) at org.vudroid.core.DecodeServiceBase.getPage(DecodeServiceBase.java:175) at com.joanzapata.pdfview.RenderingAsyncTask.proceed(RenderingAsyncTask.java:100) at com.joanzapata.pdfview.RenderingAsyncTask.doInBackground(RenderingAsyncTask.java:63) at com.joanzapata.pdfview.RenderingAsyncTask.doInBackground(RenderingAsyncTask.java:33) at android.os.AsyncTask$2.call(AsyncTask.java:292) at java.util.concurrent.FutureTask.run(FutureTask.java:237) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1115) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:590) at java.lang.Thread.run(Thread.java:818)
tell me the solution for this.
我也遇到了这个问题,该库的作者说不维护了。 不知道,有没有人知道怎么解决的? 目前,我的线索是,itext创建的1.4版本的pdf,打开就闪退。
java.lang.RuntimeException: error loading page at org.vudroid.pdfdroid.codec.PdfPage.open(Native Method) at org.vudroid.pdfdroid.codec.PdfPage.createPage(PdfPage.java:55) at org.vudroid.pdfdroid.codec.PdfDocument.getPage(PdfDocument.java:18) at org.vudroid.core.DecodeServiceBase.getPage(DecodeServiceBase.java:175) at org.vudroid.core.DecodeServiceBase.getPageWidth(DecodeServiceBase.java:214) at com.joanzapata.pdfview.PDFView.loadComplete(PDFView.java:644) at com.joanzapata.pdfview.DecodingAsyncTask.onPostExecute(DecodingAsyncTask.java:58) at com.joanzapata.pdfview.DecodingAsyncTask.onPostExecute(DecodingAsyncTask.java:31) at android.os.AsyncTask.finish(AsyncTask.java:632) at android.os.AsyncTask.access$600(AsyncTask.java:177) at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:645) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5233) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:904) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:699)