Nutrient Java SDK 1.1 migration guide

This article provides a set of guidelines for migrating from version 1.0 to version 1.1 of Nutrient Java SDK.

Opening a document

To simplify the public model and design for the future, we changed the way to open a document. Now PdfDocument has a public static method named open, which should be called in favor of constructing a new PdfDocument, which was done previously. The change is simple to make, as can be seen below.

This:

PdfDocument document = new PdfDocument(new FileDataProvider(file));

becomes this:

PdfDocument document = PdfDocument.open(new FileDataProvider(file));