PSPDFKit 8.8 Migration Guide

This guide provides the necessary steps for migrating from PSPDFKit 8 for Android to PSPDFKit 8.8 for Android.

Information

Before updating to PSPDFKit 8.8 for Android, make sure your app is running at least PSPDFKit 8 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.8.

Upgrading PSPDFKit

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

dependencies {
-   implementation 'com.pspdfkit:pspdfkit:8.7.0'
+   implementation 'com.pspdfkit:pspdfkit:8.8.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:8.7.0'
-   implementation 'com.pspdfkit:pspdfkit-ocr-english:8.7.0'
+   implementation 'com.pspdfkit:pspdfkit-ocr:8.8.0'
+   implementation 'com.pspdfkit:pspdfkit-ocr-english:8.8.0'
    ...
}

API Changes

PSPDFKit 8.8 for Android introduces a new version of the measurement tools introduced in version 8.4! There are a few breaking API changes that this version brings, so if you’re using any of the measurement tool APIs, read carefully.

Other API Changes

The API to customize the minimum annotation size for specific annotation types has changed. If you use this API, you’ll need to change your code for this version to work. (#39922)

Old: PdfConfiguration.Builder#setMinimumAnnotationSize(AnnotationType, Size)

New: Annotation#setMinimumAnnotationSizeForType(AnnotationType, Size)

Deprecations

  • PdfDocument#isValidForEditing has been deprecated in favor of PdfDocument#isWritableAndCanSave. (#40058)

  • PdfDocument#setMeasurementScale is deprecated. For more information, see above.

  • PdfDocument#getMeasurementScale is deprecated. For more information, see above.

  • PdfDocument#setMeasurementPrecision is deprecated. For more information, see above.

  • PdfDocument#getMeasurementPrecision is deprecated. For more information, see above.

  • Scale#defaultScale has been deprecated in favor of MeasurementValueConfiguration#defaultConfiguration().getScale().