Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • #6441 Reply

    Alex Black

    Hi, some of my users are experiencing issues where PlugPDF is unable to open the PDF. I suspect the problem is in my code, possibly a race condition, but, I was wondering if you could offer any insight into what might cause this error?
    Thanks, Alex

    java.lang.Exception: Error opening PDF (Exists=true, Path=/storage/emulated/0/WOInvoice/invoice/Kostenvoranschlag_KV0001.pdf)
    1 at com.aadhk.woinvoice.App.void err(android.content.Context,java.lang.String,java.lang.Exception)(ProGuard:626)
    2 at doInBackground(java.lang.Void[])(ProGuard:65)
    3 at doInBackground(java.lang.Object[])(ProGuard:19)
    4 at android.os.AsyncTask$
    5 at
    6 at java.util.concurrent.ThreadPoolExecutor.runWorker(
    7 at java.util.concurrent.ThreadPoolExecutor$
    8 at
    9Caused by: java.lang.Exception: Failed to open /storage/emulated/0/WOInvoice/invoice/Kostenvoranschlag_KV0001.pdf
    10 at com.epapyrus.plugpdf.core.PDFDocument.<init>(ProGuard:98)
    11 at doInBackground(java.lang.Void[])(ProGuard:57)
    12 … 6 more

    #6442 Reply

    Alex Black

    I managed to repro this locally somehow, and saw this in the logs too (just before the exception)

    01-27 15:58:12.960 32457-32537/com.aadhk.woinvoice E/native﹕ plugpdf.cpp:304
    Syntax Error: could not find catalog at line 354 (Gf_Error* Pdf_File::repairXref(streams::InputStream*) : jni/../../../../ext/pdfv/src/file/file_repair.cpp) line 332 (Gf_Error* Pdf_Document::repair(streams::InputStream*, const string&) : jni/../../../../ext/pdfv/src/document/pdf_doc.cpp)

    #6443 Reply

    Dr. Plug

    Hi Alex,

    That log is printed when our SDK fail to repair damaged PDF. Maybe its seems damage to as much as not be able to see. I try check your PDF file. So, could you send to me your PDF file at ‘’?


    #6444 Reply

    Alex Black

    My app generates a PDF and then uses PlugPDF to render it to an image. It looks like a race-condition type issue, where maybe the PDF was not yet finished generating when I asked PlugPDF to render it.

    I think I’ve got things figured out, thanks.

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: Failed to open
Your information: