PSPDFKit 8 migration guide

This guide provides the necessary steps for migrating from Nutrient Android SDK 7 to Nutrient Android SDK 8.

Information

Before updating to Nutrient Android SDK 8, make sure your app is running at least Nutrient Android SDK 7. If you’re running an earlier version, see our previous migration guides first, which will guide you through the necessary update steps up to version 8.

Upgrading Nutrient

Inside your app/build.gradle file, update the version of the com.pspdfkit:pspdfkit dependency to 8.0.0:

dependencies {
-   implementation 'com.pspdfkit:pspdfkit:7.0.0'
+   implementation 'com.pspdfkit:pspdfkit:8.0.0'
 }

Upgrading OCR dependencies

If your project also integrates the [Nutrient OCR library][], make sure to upgrade the version of all OCR dependencies too:

dependencies {
-   implementation 'com.pspdfkit:pspdfkit-ocr:7.0.0'
-   implementation 'com.pspdfkit:pspdfkit-ocr-english:7.0.0'
+   implementation 'com.pspdfkit:pspdfkit-ocr:8.0.0'
+   implementation 'com.pspdfkit:pspdfkit-ocr-english:8.0.0'
    ...
}

Replacing Deprecated Symbols

PSPDFKit 8 for Android marked several symbols as deprecated, and they’ll be removed in a future update in Q4 2021. What follows is the list of all the deprecated symbols, along with their replacements:

  • Renamed: PdfDrawable#updatePDFToViewTransformation() to PdfDrawable#updatePdfToViewTransformation()
    The method was renamed due to an inconsistent casing style and now uses the SDK-wide casing.

  • Renamed: PdfDrawable#getPDFToPageTransformation() to PdfDrawable#getPdfToPageTransformation()
    The method was renamed due to an inconsistent casing style and now uses the SDK-wide casing.

Electronic signatures

PSPDFKit 8 for Android introduces the Electronic Signatures component, which provides a new UI and APIs for adding signature annotations. See the Electronic Signatures migration guide for details on how to migrate away from using the SignaturePickerFragment.