PSPDFKit 8 Migration Guide for Android | Step-by-Step Guide
This guide provides the necessary steps for migrating from PSPDFKit 7 for Android to PSPDFKit 8 for Android.
Before updating to PSPDFKit 8 for Android, make sure your app is running at least PSPDFKit 7 for Android. 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 PSPDFKit
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 PSPDFKit 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()
toPdfDrawable#updatePdfToViewTransformation()
The method was renamed due to an inconsistent casing style and now uses the SDK-wide casing. -
Renamed:
PdfDrawable#getPDFToPageTransformation()
toPdfDrawable#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. Please see the Electronic Signatures migration guide for details on how to migrate away from using the SignaturePickerFragment
.