A Pdfium Android library using the latest stable version Pdfium. Written in Kotlin with coroutines to easily talk to the native code off the main thread.
Largely rewritten, but based on https://github.com/barteksc/PdfiumAndroid
This version give you two versions of the API, one that using suspend function, and one that doesn't (and that should work from Java).
This is a object-oriented version. PfdiumCore is give you options to open up the PDF, all the methods on document are from PdfDocumment. Likewise there's an PdfPage and PdfTextPage. You get the Page objects from the PdfDocument, all the things that operation on the pages.
For using suspend functions, use PdfiumCoreKt, and it'll return PdfDocummentK, PdfDocummentK give PdfPageKt and PdfTextPageKt. All the Kt classes have suspend functions, and will do there work on the dispathcer that's passed into PdfiumCoreKt when its created.
PdfDocument, PdfPage, PdfTextPage and Kt versions all uses Closable.
To use it, add the following app's build.gradle:
implementation("io.legere:pdfiumandroid:1.0.24")
Additionally, there is a separate module that provides a functional interface via arrow-kt. This is a separate module, and is not included in the main library. To use it, add the following app's build.gradle:
implementation("io.legere:pdfium-android-kt-arrow:1.0.24")
For more information on arrow-kt, see the https://arrow-kt.io/