Throwing PdfOpenException while populating a pdf file in phone storage
Opened this issue · 0 comments
shyamsam commented
Am getting an exception while reading a pdf which is in phone internal memory. I have given the permission to read in the manifest file.
But am getting an exception at the place given below:
com.shockwave.pdfium.PdfOpenException: Open document failed
at com.shockwave.pdfium.PdfiumCore.newDocument(PdfiumCore.java:72)
at com.github.barteksc.pdfviewer.DecodingAsyncTask.doInBackground(DecodingAsyncTask.java:64)
at com.github.barteksc.pdfviewer.DecodingAsyncTask.doInBackground(DecodingAsyncTask.java:33)
at android.os.AsyncTask$2.call(AsyncTask.java:288)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:841)
The exception is in the line pdfDocument = pdfiumCore.newDocument(getSeekableFileDescriptor(path));
Could you please help me to overcome this.
Thanks