JoanZapata / android-pdfview

[DEPRECATED] A fast PDF reader component for Android development
http://joanzapata.com/android-pdfview/
GNU General Public License v3.0
2.83k stars 783 forks source link

error loading page #182

Open githubityu opened 8 years ago

githubityu commented 8 years ago

02-22 16:02:31.688: E/AndroidRuntime(5700): java.lang.RuntimeException: error loading page 02-22 16:02:31.688: E/AndroidRuntime(5700): at org.vudroid.pdfdroid.codec.PdfPage.open(Native Method) 02-22 16:02:31.688: E/AndroidRuntime(5700): at org.vudroid.pdfdroid.codec.PdfPage.createPage(PdfPage.java:55) 02-22 16:02:31.688: E/AndroidRuntime(5700): at org.vudroid.pdfdroid.codec.PdfDocument.getPage(PdfDocument.java:18) 02-22 16:02:31.688: E/AndroidRuntime(5700): at org.vudroid.core.DecodeServiceBase.getPage(DecodeServiceBase.java:175) 02-22 16:02:31.688: E/AndroidRuntime(5700): at org.vudroid.core.DecodeServiceBase.getPageWidth(DecodeServiceBase.java:214) 02-22 16:02:31.688: E/AndroidRuntime(5700): at com.joanzapata.pdfview.PDFView.loadComplete(PDFView.java:656) 02-22 16:02:31.688: E/AndroidRuntime(5700): at com.joanzapata.pdfview.DecodingAsyncTask.onPostExecute(DecodingAsyncTask.java:55) 02-22 16:02:31.688: E/AndroidRuntime(5700): at com.joanzapata.pdfview.DecodingAsyncTask.onPostExecute(DecodingAsyncTask.java:1) 02-22 16:02:31.688: E/AndroidRuntime(5700): at android.os.AsyncTask.finish(AsyncTask.java:632) 02-22 16:02:31.688: E/AndroidRuntime(5700): at android.os.AsyncTask.access$600(AsyncTask.java:177) 02-22 16:02:31.688: E/AndroidRuntime(5700): at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:645) 02-22 16:02:31.688: E/AndroidRuntime(5700): at android.os.Handler.dispatchMessage(Handler.java:102) 02-22 16:02:31.688: E/AndroidRuntime(5700): at android.os.Looper.loop(Looper.java:136) 02-22 16:02:31.688: E/AndroidRuntime(5700): at android.app.ActivityThread.main(ActivityThread.java:5072) 02-22 16:02:31.688: E/AndroidRuntime(5700): at java.lang.reflect.Method.invokeNative(Native Method) 02-22 16:02:31.688: E/AndroidRuntime(5700): at java.lang.reflect.Method.invoke(Method.java:515) 02-22 16:02:31.688: E/AndroidRuntime(5700): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793) 02-22 16:02:31.688: E/AndroidRuntime(5700): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:609) 02-22 16:02:31.688: E/AndroidRuntime(5700): at dalvik.system.NativeStart.main(Native Method)

derohimat commented 8 years ago

i have same problem too, how to resolved it ?

derohimat commented 8 years ago

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)

githubityu commented 8 years ago

Some PDF files can be read normally, but some can not read, do not know why.

eaceto commented 8 years ago

I have the same problem only if I perform one loading after another one, several times (each one waits the previous to finish),

An "onErrorListener" will be great in order to avoid the RuntimeException.

githubityu commented 8 years ago

https://github.com/muennich/mupdf Use this library

491129830 commented 8 years ago

i have the same problem,some PDF files can be read,but some can not read,why?

xiaominglei001 commented 8 years ago

java.lang.RuntimeException: error loading page??????????????why???????????????

sarfarazr1406 commented 8 years ago

Is there a solution for this error or not? Actually its very frustrating because application crashes for random pdf files and can not even handle this exception through try catch block.