General breaking changes list
-
SLF4J dependency is updated from 1.7 to 2.0.16, this forces the user to update logback to at least version 1.3.X because logback 1.2.X does not work with SLF4J 2.X
-
Conformance changes:
-
com.itextpdf.kernel.pdf.IConformanceLevelinterface was removed and replaced by aggregatorPdfConformanceclass which can store both PDF/A and PDF/UA conformance. -
com.itextpdf.kernel.pdf.PdfAConformanceLevelandPdfUAConformanceLevelclasses with constants were replaced byPdfAConformanceandPdfUAConformanceenums.
-
-
We have made a lot of fields private, in most cases we provide getters and/or setters, as well as make some constants final.
-
F.e. Getting the start value for GlyphLine:
-
Before:
glyphLine.start -
Now:
glyphLine.getStart()
-
-
F.e. Setting the end value for GlyphLine:
-
Before:
glyphLine.end = 23; -
Now:
glyphLine.setEnd(23);
-
-
Kernel module
|
Breaking change |
Upgrade path |
|---|---|
|
Changed
|
Page number was never properly supported and didn’t have any meaning. So, do not use |
|
Changed
|
|
|
Removed deprecated |
Shouldn’t be used |
|
Removed |
Use |
|
Removed |
Use
|
|
Modified
|
Use |
|
Renamed and moved Also added new |
Use |
|
Moved Also replaced |
Use |
|
Moved Also replaced |
Use |
|
Removed in |
This was not intended to be a public method, use the methods with the PageDictionary |
|
PdfWriter now throws an IOException instead of FileNotFoundException. |
Instead of throwing a |
|
Modified
|
Instead of direct accessing |
|
Modified
|
Use another constructor |
|
Modified
|
Instead of direct accessing, use |
|
Modified
|
Implement For |
|
Modified
|
These methods are for internal usage only (that’s why they moved to |
|
Modified
|
|
|
Modified
|
|
|
Propagated the inner PdfShading classes into seperate independent class files, as well as renamed the base class.
|
Before (depending on the import):
or
Now:
|
|
Modified
|
Example of the updated code:
|
|
Modified
|
Overriding of |
|
Modified
|
|
|
Modified
|
There are no ways to disable one warning on page flushing. |
Sign module
|
Breaking change |
Upgrade path |
|---|---|
|
Renamed |
|
|
Changed
|
|
|
Removed |
Use |
|
Removed |
Code sample with OCSP response validation:
|
|
Removed |
Use |
|
Removed |
Use It is possible to set other appearance related properties such as Page, rectangle and other properties could be also set up via For default appearance use
|
|
Modified
|
Instead:
Example:
|
|
Removed |
Set these properties to |
|
Moved Moved Moved all constants from |
|
Forms module
|
Breaking change |
Upgrade path |
|---|---|
|
Modified
|
Instead of |
|
Modified
|
Use |
|
Removed |
Use |
|
Removed |
Could be replaced by Also useful check:
|
|
Removed |
Instead of
use
|
|
Modified
|
Instead of Instead of |
|
Now choice fields (list boxes and combo boxes) and text fields with |
|
Pdfa module
|
Breaking change |
Upgrade path |
|---|---|
|
Modified |
These methods are implemented in the inheritors of the |
|
|
Use |
|
|
Use new single |
Layout module
|
Breaking change |
Upgrade path |
|---|---|
|
Modified |
Use |
|
Removed |
Use |
|
Removed deprecated |
Use |
|
Removed |
Use |
|
Removed |
Use |
|
Changed default FontSelectorStrategy from |
To use FirstMatchStrategy:
|
|
Modified
|
Instead of |
|
Modified `com.itextpdf.layout.properties.Property`:
|
|
Io module
|
Breaking change |
Upgrade path |
|---|---|
|
Removed all the deprecated methods in the |
Most of the methods are deprecated in favour of |
|
Removed |
Use |
|
Removed |
Use |
|
Internal class |
|
Licensekey
|
Breaking change |
Upgrade path |
|---|---|
|
Removed |
Use |
|
Removed some exception and log message constants, e.g.
|
Use
|
Html2Pdf
|
Breaking change |
Upgrade path |
|---|---|
|
Removed from
|
Use
|
|
Removed deprecated overloads for |
Use |
|
Removed the following HtmlLogMessageConstants:
These log messages can be replaced by using the equivalent ones from StyledXmlParserLogMessageConstant which contain the same message. |
Instead of
use
|
PdfXfa
|
Breaking change |
Upgrade path |
|---|---|
|
Removed |
Use |
|
Removed Deprecated |
Use |
PdfOcr
|
Breaking change |
Upgrade path |
|---|---|
|
Modified |
Implement depending on whether tagging is supported by OCR engine. |