Skip to content

johngray1965/PdfiumAndroidKt

Repository files navigation

PdfiumAndroidKt

Android CI

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.19")

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.19")

For more information on arrow-kt, see the https://arrow-kt.io/

About

Pdfium Android binding with Bitmap rendering ( >= API 21 )

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published