The release of iText Suite 9.6 includes a new major version of the pdfOCR add-on, going from version 4.1.2 to 5.0.0.
The primary reasons for this change are the support for additional ONNX models and GPU acceleration using OnnxRuntime, however, we’ve taken this opportunity to refine the API in other areas, adding and renaming artifacts/packages, and various classes and methods.
For more details on the new and improved features in pdfOCR 5.0.0, see the release notes.
General Breaking Changes
New and renamed artifacts/packages to accommodate extra model support and optional GPU acceleration:
Renamed Artifacts/Packages
-
Removed tr suffix in class/methods names and documentation. See the Detailed Breaking Changes section below.
-
Java
-
com.itexpdf.pdfocr.onnxtr→com.itextpdf.pdfocr.onnx
-
-
.NET
-
iText.Pdfocr.Onnxtr→iText.Pdfocr.Onnx
-
New Artifacts/Packages
-
Java
-
The
com.itextpdf.pdfocr-onnxtrartifact has been split intocom.itextpdf.pdfocr-onnx-abstractandcom.itextpdf.pdfocr-onnx-cpu.
-
-
.NET
-
The
itext.pdfocr.onnxtrNuGet package has been split intoitext.pdfocr.onnx.abstractanditext.pdfocr.onnx.cpuNuGet packages.
-
Detailed Breaking Changes
|
Breaking change |
Upgrade path |
|---|---|
|
Class |
|
|
Class Constant |
|
|
Class Constant |
|
|
Class Method Method Method |
Use Use |
|
Class |
|
|
Class Constructor |
Use |
|
Enum |
Use |
|
Class Constant Constructor |
Use |
|
Class Constant |
|
|
Class Constants |
|
|
Class Constructor |
|
|
Class Constructor Return type of the Methods |
In order to create
use
|
|
Behavior breaking change. Added support for arbitrary rotation angles for text chunks. The text rotation angle depends on the text detection result (also taking into account orientation prediction result). |
In order to enable old behavior with only 0, 90, 180 and 270 degrees rotation support, apply
|
|
Interface |
Override the following methods in classes that implement
|