Coder Social home page Coder Social logo

Comments (14)

barteksc avatar barteksc commented on July 4, 2024

Show some code, there is nothing useful in this stacktrace

from androidpdfviewer.

elsennov avatar elsennov commented on July 4, 2024
pdfView.fromFile(pdfFile)
                .defaultPage(DEFAULT_PAGE)
                .showMinimap(false)
                .enableSwipe(true)
                .onLoad(nbPages -> LogUtils.debug(TAG, "onLoad PDF"))
                .onPageChange((page, pageCount) -> LogUtils.debug(TAG, "onPageChange PDF"))
                .onError(throwable -> LogUtils.error(TAG, "Error in opening PDF", throwable))
                .load();

from androidpdfviewer.

barteksc avatar barteksc commented on July 4, 2024

Does pdfFile exist (by using pdfFile.exists())?

from androidpdfviewer.

elsennov avatar elsennov commented on July 4, 2024

Yes, absolutely i defense the code before passed it

from androidpdfviewer.

barteksc avatar barteksc commented on July 4, 2024

What is the path of file? Internal memory, physical SD card?

from androidpdfviewer.

elsennov avatar elsennov commented on July 4, 2024

The root is Environment.getExternalStorageDirectory();
This error happened intermittently.

from androidpdfviewer.

barteksc avatar barteksc commented on July 4, 2024

It must be issue in native lib, I'll take a look at it yesterday, but it looks strange

from androidpdfviewer.

elsennov avatar elsennov commented on July 4, 2024

Okay thank you

from androidpdfviewer.

JbDenoual avatar JbDenoual commented on July 4, 2024

Hi, same error here :
`D/jniPdfium: Init FPDF library

D/ConnectivityReceiver: Internet Connected
D/AbsListView: unregisterIRListener() is called
D/jniPdfium: File Size: 295
D/jniPdfium: Destroy FPDF library
E/jniPdfium: Error loading document from file map
E/jniPdfium: Last Error: 3
E/com.shockwave.pdfium.PdfiumCore: Open document failed
D/v_gal: [tid=26645] gralloc_register_buffer: ===>Width = 480, Height = 800,
E/PDFView: load pdf error
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:61)
at com.github.barteksc.pdfviewer.DecodingAsyncTask.doInBackground(DecodingAsyncTask.java:32)
at android.os.AsyncTask$2.call(AsyncTask.java:287)
at java.util.concurrent.FutureTask.run(FutureTask.java:234)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
at java.lang.Thread.run(Thread.java:856)`

Looks like getNumFd() catched an IllegalAccessException and returned -1

from androidpdfviewer.

barteksc avatar barteksc commented on July 4, 2024

@jayDLabs You got Pdfium error 3, it means that PDF is corrupted or some other unknown error occurred. Check if you can open this file in another reader

from androidpdfviewer.

JbDenoual avatar JbDenoual commented on July 4, 2024

Exact, the PDF is corrupted, something went wrong when downloading it on my side, my bad.
Thank you !

from androidpdfviewer.

barteksc avatar barteksc commented on July 4, 2024

@elsennov please check if version 1.1.0 fixes this issue

from androidpdfviewer.

elsennov avatar elsennov commented on July 4, 2024

@barteksc ok

from androidpdfviewer.

elsennov avatar elsennov commented on July 4, 2024

Seems it has been solved in 1.1.0. No crash occurred! Thanks @barteksc

from androidpdfviewer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.