PDFDoc(file://). files

Product: PDFTron Android/Kotlin

Product Version: 9.0.1

Please give a brief summary of your issue:
Fails to Load PDF document from https url or local file Uri

 val doc = PDFDoc(Uri.parse(file).path).  <-- Error line

Won’t load either from local download file. or https url
file variable = file:///storage/emulated/0/Download/Form.pdf

Error returned and Crash

java.lang.UnsatisfiedLinkError: No implementation found for long com.pdftron.pdf.PDFDoc.PDFDocCreate(java.lang.String) (tried Java_com_pdftron_pdf_PDFDoc_PDFDocCreate and Java_com_pdftron_pdf_PDFDoc_PDFDocCreate__Ljava_lang_String_2)

I have tried with a Local file Uri and Https url
Works when I use DocumentActivity.openDocument. but not when I’m trying to load the document myself.

Purpose: Trying to load a Form based PDF. auto fill in some fields and then have the user enter data into other fields. I then need the data back. Not sure how to use DocumentActivity and get the dat back??

Thanks in advance


The recommended way to integrate with the viewer is using Fragment:

This will allow you to have customization ability (such as pre-fill form), also allow users to fill the rest later.

The error you are getting means the library is not initialized properly, please follow the integration guide to ensure the library is initialized properly:

We also have more samples of various kind you can find here as reference:

If you are still having more issue, please submit a ticket with your exact project here: