-
Notifications
You must be signed in to change notification settings - Fork 332
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cannot load page error #183
Comments
Hi! it seems you have a RecyclerView with Pdf documents on each row. This can potentially lead to memory issues, as some Pdf documents are quite heavy to load in memory. If you load/unload them as the user scrolls, you may get OutOfMemory exceptions. Anyway, it seems the
|
when i load one by one , the pdf open perfect. one way to prevent the app crashing is add a try catch in PDFPageAdapter try {
`` |
hi, i have problem when load some pdfs
i have recyclerview with multiple viewtypes, when i have 5 pdf view, the app crashed
java.lang.IllegalStateException: cannot load page
at android.graphics.pdf.PdfRenderer.nativeOpenPageAndGetSize(Native Method)
at android.graphics.pdf.PdfRenderer.access$300(PdfRenderer.java:105)
at android.graphics.pdf.PdfRenderer$Page.(PdfRenderer.java:312)
at android.graphics.pdf.PdfRenderer$Page.(PdfRenderer.java:289)
at android.graphics.pdf.PdfRenderer.openPage(PdfRenderer.java:230)
at es.voghdev.pdfviewpager.library.adapter.BasePDFPagerAdapter.getPDFPage(BasePDFPagerAdapter.java:162)
at es.voghdev.pdfviewpager.library.adapter.PDFPagerAdapter.instantiateItem(PDFPagerAdapter.java:56)
at androidx.viewpager.widget.ViewPager.addNewItem(ViewPager.java:1010)
at androidx.viewpager.widget.ViewPager.populate(ViewPager.java:1224)
at androidx.viewpager.widget.ViewPager.populate(ViewPager.java:1092)
at androidx.viewpager.widget.ViewPager$3.run(ViewPager.java:273)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1031)
at android.view.Choreographer.doCallbacks(Choreographer.java:854)
at android.view.Choreographer.doFrame(Choreographer.java:785)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1016)
at android.os.Handler.handleCallback(Handler.java:883)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loop(Looper.java:224)
at android.app.ActivityThread.main(ActivityThread.java:7562)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:539)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:950)
this is my android code
class ReleasePdfViewHolder(binding: ItemPublishReleasePdfBinding) : BaseViewHolder(binding), DownloadFile.Listener {
}
The text was updated successfully, but these errors were encountered: