Blog Post

PSPDFKit 6.3 for Android

Today we’re releasing PSPDFKit 6.3 for Android, in which we focused on improvements for Kotlin users. In this blog post, we outline the biggest changes of 6.3. For a full list of changes, please refer to our PSPDFKit 6.3 for Android changelog.

Kotlin Examples

As the Kotlin programming language solidifies in the Android ecosystem, more and more of our customers are making the switch to Kotlin too. We are happy to see this movement, and we want to support developers with the transition as best as possible. As such, for PSPDFKit 6.3 for Android, we have rewritten most of our existing Catalog examples to also be in Kotlin.

Kotlin Examples

The Catalog app now features a new language switcher that allows developers to pick their preferred example language. Since most examples now exist in two implementations — Java and Kotlin — you can pick the one you prefer.

Furthermore, we think Kotlin is here to stay, so we’re doubling down on our commitment to the language, and going forward, we will write and publish all new Catalog examples in Kotlin only.

API Enhancements

While all of our APIs have been fully functional and usable from Kotlin sources since the beginning, for this release, we carefully inspected all major APIs for ease of use and improved several areas to make using PSPDFKit within your Kotlin sources simpler and easier than before. One example of this project is the extension of APIs that have been using Java Class parameters so far, which we did by adding support for Kotlin’s KClass type:

val intent = PdfActivityIntentBuilder.fromUri(context, Uri.fromFile(documentFile))

The simplification and extension of our APIs for Kotlin users is an ongoing process, so expect more changes in future versions. If you have any ideas or wishes for Kotlin improvements, please feel free to reach out to our engineers.

KDoc API Reference

Most of the time, using a Java library within Kotlin sources is a straightforward process, thanks to the great interoperability between Kotlin and Java. And yet, at times, having a dedicated Kotlin API reference on hand makes development faster and more fun. Therefore, we enhanced our internal tooling, and starting with PSPDFKit 6.3 for Android, we now ship separate KDoc API reference files that document our entire API using Kotlin syntax and types.

KDoc API Reference

PSPDFKit 6.3 for Android bundles the new KDoc API reference into the ZIP file that can be downloaded from the PSPDFKit Portal, and we are working on providing an online version of KDoc API references on our website too.

And More

  • We renamed our Catalog applicationId to com.pspdfkit.catalog and improved its internal structure. When installing the new Catalog, make sure to uninstall any old Catalog APKs from your test devices to avoid confusion with previous versions.

  • PSPDFKit 6.3 for Android adds support for having multiple PdfFragment instances inside the same view hierarchy — something that was only supported with limitations up until now.

  • We bumped versions of several dependencies to the latest stable version, including the Kotlin standard library, the NDK, ReLinker, and RxJava. The specific versions can be found in our migration guide.

As always, this is just a sneak peek at the enhancements we added to this release. To see a complete list of changes, check out the PSPDFKit 6.3 for Android changelog.

Tomáš Šurín Server and Services Engineer

Tomáš has a deep interest in building (and breaking) stuff both in the digital and physical world. In his spare time, you’ll find him relaxing off the grid, cooking good food, playing board games, and discussing science and philosophy.

Related Products
Share Post
Free 60-Day Trial Try PSPDFKit in your app today.
Free Trial

Related Articles

Explore more
DEVELOPMENT  |  Android • Kotlin • Tips • UI/UX

Change Android Themes Instantly Using the Circular Reveal Animation

PRODUCTS  |  Android • Releases

PSPDFKit 6.2 for Android

TUTORIALS  |  Android • Kotlin • PDF • How To

Inserting an Image into a PDF on Android