You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Error: Unable to open page 1 - Current page not closed.
Exception: java.lang.IllegalStateException: Current page not closed
at android.graphics.pdf.PdfRenderer.throwIfPageOpened(PdfRenderer.java:260)
at android.graphics.pdf.PdfRenderer.openPage(PdfRenderer.java:218)
at com.rajat.pdfviewer.PdfRendererCore.openPageSafely(PdfRendererCore.kt:198)
at com.rajat.pdfviewer.PdfRendererCore.access$openPageSafely(PdfRendererCore.kt:26)
at com.rajat.pdfviewer.PdfRendererCore$renderPage$2.invokeSuspend(PdfRendererCore.kt:121)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:115)
at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:103)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:793)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:697)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:684)
And repeats for almost all pages like:
Error: Unable to open page 1 - Current page not closed.
Exception: java.lang.IllegalStateException: Current page not closed
Error: Unable to open page 2 - Current page not closed.
Exception: java.lang.IllegalStateException: Current page not closed
Error: Unable to open page 3 - Current page not closed....
Relevant Code/Stack Trace: [Include code snippet or stack trace if applicable]
Exception: java.lang.IllegalStateException: Current page not closed
at android.graphics.pdf.PdfRenderer.throwIfPageOpened(PdfRenderer.java:260)
at android.graphics.pdf.PdfRenderer.openPage(PdfRenderer.java:218)
at com.rajat.pdfviewer.PdfRendererCore.openPageSafely(PdfRendererCore.kt:198)
at com.rajat.pdfviewer.PdfRendererCore.access$openPageSafely(PdfRendererCore.kt:26)
at com.rajat.pdfviewer.PdfRendererCore$renderPage$2.invokeSuspend(PdfRendererCore.kt:121)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:115)
at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:103)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:793)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:697)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:684)
🤔 Expected Behavior
What did you expect to happen?
Open pdf and page 1 loads and as i scroll other pages load
🖼️ Screenshots/Videos
If applicable, add screenshots or videos to help explain your problem.
Screen_recording_20250310_101454.mp4
📱 Smartphone Info:
Device: [e.g., Samsung Galaxy S10]
Xiaomi 12 Lite
OS: [e.g., Android 14]
Android 14
Library Version: [e.g., 2.0.0]
2.2.1
💻 Code Snippets
Include relevant code snippets or links to code repositories.
startActivity(PdfViewerActivity.Companion.launchPdfFromUrl(
getApplicationContext(),
url,
fileName,
saveTo.ASK_EVERYTIME,
true,
true,
headers,
ToolbarTitleBehavior.MULTI_LINE_WRAP,
CacheStrategy.MINIMIZE_CACHE
));
📜 Log Output/Stack Trace
Include any error logs or stack trace for more context.
Exception: java.lang.IllegalStateException: Current page not closed
at android.graphics.pdf.PdfRenderer.throwIfPageOpened(PdfRenderer.java:260)
at android.graphics.pdf.PdfRenderer.openPage(PdfRenderer.java:218)
at com.rajat.pdfviewer.PdfRendererCore.openPageSafely(PdfRendererCore.kt:198)
at com.rajat.pdfviewer.PdfRendererCore.access$openPageSafely(PdfRendererCore.kt:26)
at com.rajat.pdfviewer.PdfRendererCore$renderPage$2.invokeSuspend(PdfRendererCore.kt:121)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:115)
at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:103)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:793)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:697)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:684)
💬 Additional Context
I tried changing CacheStrategy.MINIMIZE_CACHE to CacheStrategy.MAXIMIZE_PERFORMANCE
The text was updated successfully, but these errors were encountered:
Thank you for creating your first issue. We appreciate your help in making this project better. We will look into it, and get back to you soon. Need help or want to discuss this issue? Join our Discord community here to ask questions and discuss this issue live!
📝 Describe the Bug
PDF Page 1 loads but other pages are blank
Tag: PDF_OPEN_TRACKER
Log Level: ERROR
Error: Unable to open page 1 - Current page not closed.
Exception: java.lang.IllegalStateException: Current page not closed
at android.graphics.pdf.PdfRenderer.throwIfPageOpened(PdfRenderer.java:260)
at android.graphics.pdf.PdfRenderer.openPage(PdfRenderer.java:218)
at com.rajat.pdfviewer.PdfRendererCore.openPageSafely(PdfRendererCore.kt:198)
at com.rajat.pdfviewer.PdfRendererCore.access$openPageSafely(PdfRendererCore.kt:26)
at com.rajat.pdfviewer.PdfRendererCore$renderPage$2.invokeSuspend(PdfRendererCore.kt:121)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:115)
at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:103)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:793)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:697)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:684)
And repeats for almost all pages like:
Error: Unable to open page 1 - Current page not closed.
Exception: java.lang.IllegalStateException: Current page not closed
Error: Unable to open page 2 - Current page not closed.
Exception: java.lang.IllegalStateException: Current page not closed
Error: Unable to open page 3 - Current page not closed....
📖 Library Version
2.2.1
🚶 Steps to Reproduce
Please follow these steps to reproduce the issue:
getApplicationContext(),
url,
fileName,
saveTo.ASK_EVERYTIME,
true,
true,
headers,
ToolbarTitleBehavior.MULTI_LINE_ELLIPSIS,
CacheStrategy.MINIMIZE_CACHE
));
Exception: java.lang.IllegalStateException: Current page not closed
at android.graphics.pdf.PdfRenderer.throwIfPageOpened(PdfRenderer.java:260)
at android.graphics.pdf.PdfRenderer.openPage(PdfRenderer.java:218)
at com.rajat.pdfviewer.PdfRendererCore.openPageSafely(PdfRendererCore.kt:198)
at com.rajat.pdfviewer.PdfRendererCore.access$openPageSafely(PdfRendererCore.kt:26)
at com.rajat.pdfviewer.PdfRendererCore$renderPage$2.invokeSuspend(PdfRendererCore.kt:121)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:115)
at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:103)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:793)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:697)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:684)
🤔 Expected Behavior
What did you expect to happen?
Open pdf and page 1 loads and as i scroll other pages load
🖼️ Screenshots/Videos
If applicable, add screenshots or videos to help explain your problem.
Screen_recording_20250310_101454.mp4
📱 Smartphone Info:
💻 Code Snippets
Include relevant code snippets or links to code repositories.
startActivity(PdfViewerActivity.Companion.launchPdfFromUrl(
getApplicationContext(),
url,
fileName,
saveTo.ASK_EVERYTIME,
true,
true,
headers,
ToolbarTitleBehavior.MULTI_LINE_WRAP,
CacheStrategy.MINIMIZE_CACHE
));
📜 Log Output/Stack Trace
Include any error logs or stack trace for more context.
Exception: java.lang.IllegalStateException: Current page not closed
at android.graphics.pdf.PdfRenderer.throwIfPageOpened(PdfRenderer.java:260)
at android.graphics.pdf.PdfRenderer.openPage(PdfRenderer.java:218)
at com.rajat.pdfviewer.PdfRendererCore.openPageSafely(PdfRendererCore.kt:198)
at com.rajat.pdfviewer.PdfRendererCore.access$openPageSafely(PdfRendererCore.kt:26)
at com.rajat.pdfviewer.PdfRendererCore$renderPage$2.invokeSuspend(PdfRendererCore.kt:121)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:115)
at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:103)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:793)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:697)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:684)
💬 Additional Context
I tried changing CacheStrategy.MINIMIZE_CACHE to CacheStrategy.MAXIMIZE_PERFORMANCE
The text was updated successfully, but these errors were encountered: