Nutrient 8.8 migration guide

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

Information

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

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 [Nutrient 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

Nutrient Android SDK 8.8 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().