Skip to main content
Skip table of contents

Release iText Core 7.2.0

Release date: October 25, 2021

We are pleased to announce the next major version of iText 7; iText 7.2.0.

The most important change in this release of iText 7 is the new Unified License Mechanism, where we can have independent licenses for iText 7 Core, iText 7 add-ons and other products, send statistics to the server, allow users to easily check used volume, and more. As you might guess from the name, the Unified License Mechanism affects the entire iText 7 Suite, so please also check out the iText add-ons which have received updates along with this release.

As this is a major release, please note that we have removed deprecated and redundant methods from the API. This will allow us to better maintain the code and more easily add new functionality in the future.

We have some news for .NET users, as from this release we are bumping our minimum supported version of the .NET Framework from 4.5 to 4.6.1. The main reason for this change is that it allows the use of the Microsoft.Extensions.Logging framework which is built into .NET Framework 4.6.1, in iText-related code. We expect this to be more popular for our .NET community, since this framework is more modern and flexible, and, most importantly, secure.

On the Java side. as a next step for wider SVG support in future releases, we have upgraded to a newer version of the jsoup HTML parser, which iText 7 uses for SVG processing. This version of jsoup (1.14.1), brings a number of security and stability fixes, in addition to its improved SVG support. Probably the most immediate expected improvement resulting from this upgrade is that SVG tags will now be correctly processed in a case-sensitive manner, as per the specification.

Separately, it should be noted that this release contains a security bug fix for a vulnerability that allowed the use of GhostScript in an unpredictable manner.

As for the rest of the changes, 7.2 brings a number of bugfixes, plus some significant improvements to the codebase. Some of these may not yet be visible, but will have an important effect on the further development of the iText 7 Suite, its security, and performance.

iText 7 Suite Releases

Release Related Examples


Downloads:



Breaking Changes

A list of all breaking changes in this release can be found by clicking the "Changelog" tab below:

  • Bump to .NET Framework 4.6.1
  • Renamed/moved classes
    • com.itextpdf.kernel.counter.SystemOutEventCounter to com.itextpdf.kernel.counter.StandardOutputEventCounter
    • com.itextpdf.kernel.counter.SystemOutEventCounterFactory to com.itextpdf.kernel.counter.StanardOutputEventCounterFactory 
    • ObjectPath, TrailerPath, OffsetPathItem, ArrayPathItem, DictPathItem, IndirectPathItem, LocalPathItem classes have been moved from the CompareTool class to the separate directory.
    • When it's relevant for user: when any of the mentioned classes were directly used in the user's code.
    • Action from user: just update import/using statements and used class names. The functionality and API of these classes have not changed, if it's not explicitly mentioned below.
  • Deprecated PdfA1Checker#checkColor(Color, PdfDictionary, boolean) and PdfA1Checker#checkExtGState(CanvasGraphicsState) have been removed.
  • Deprecated PdfA2Checker#checkColor(Color, PdfDictionary, boolean) and PdfA2Checker#checkExtGState(CanvasGraphicsState) have been removed.
  • Deprecated abstract PdfAChecker#checkColor(Color, PdfDictionary, boolean) and PdfAChecker#checkExtGState(CanvasGraphicsState) have been removed.
  • serialVersionUID, readObject(ObjectInputStream)/writeObject(ObjectOutputStream), getSerializedBytes and implements Serializable have been removed.
  • Rename constants in PdfException to our codestyle (UPPERCASE). 
  • Move constants from PdfException to separate specific classes.
  • XmlUtils#initNewXmlDocument() method in kernel module has been moved to the XmlUtil#initNewXmlDocument() in the io module.
  • Remove deprecated counters API based in com.itextpdf.kernel.log.
  • Deprecated methods in the IO module have been removed: ImageDataFactory#createBmp(URL, boolean, int)ImageDataFactory#createBmp(byte[], boolean, int)FileUtil#getParentDirectory(String), SystemUtil#getSystemTimeMillis() CMapEncoding#getCmapCode(int), BmpImageData#getSize().
  • Deprecated constructors in the IO module have been removed: BmpImageData(URL, boolean, int), BmpImageData(byte[], boolean, size).
  • Deprecated classes in the IO module have been removed: FontConstants, IdelOutputStream, ReusableRandomAccessSource.
  • Deprecated constants in the LogMessageConstant class have been removed: IMAGE_MASK_CLEAN_UP_NOT_SUPPORTED, REDACTION_OF_ANNOTATION_TYPE_WATERMARK_IS_NOT_SUPPORTED, XREF_ERROR.
  • Removed RootRenderer#currentPageNumber field.
    • When it's relevant for user: when having custom extensions of RootRenderer and specifically DocumentRenderer classes.
    • Action from user: Use instead RootRenderer#getCurrentArea().getPageNumber()to get the page number of current layout area. Inside DocumentRenderer#addNewPage method the result of #getCurrentArea().getPageNumber() denotes the page of the last layout area, use ( PdfDocument#getNumberOfPages + 1 ) if you need to get the page number that is to be added.
  • Remove redundant throws from all repositories in Java.
  • Rename PdfSimpleFont#shortTag and PdfType0Font#longTag to usedGlyphs.
  • Delete deprecated PdfTrueTypeFont#addRangeUni and PdfType0Font#addRangeUni.
  • Rename PdfType3Font#calculateShortTag to calculateUsedGlyphs.
  • Deprecated methods in the sign module have been removed: OCSPVerifier#isValidResponse(BasicOCSPResp, X509Certificate), PdfPKCS7#getAuthenticatedAttributeBytes(byte[], byte[], Collection<byte[]>, PdfSigner.CryptoStandard), PdfPKCS7#verify(), PdfPKCS7#getEncodedPKCS7(byte[], ITSAClient, byte[], Collection<byte[]>, PdfSigner.CryptoStandard), SignatureUtil#asLongArray(PdfArray), SignatureUtil#verifySignature(String), SignatureUtil#verifySignature(String, String), 
  • Deprecated constructors in the sign module have been removed: PdfSigner(PdfReader, OutputStream, boolean), PdfSigner(PdfReader, OutputStream, String, boolean).
  • Deprecated constants in the forms module have been removed: PdfFormField# DEFAULT_FONT_SIZE, PdfFormField#MIN_FONT_SIZE, PdfFormField#DA_FONT, PdfFormField#DA_SIZE, PdfFormField#DA_COLOR, PdfFormField#X_OFFSET, XfdfConstants#ATTRIBUTE_NAME_OR_VALUE_MISSING, XfdfConstants#PAGE_IS_MISSING, XfdfConstants#UNSUPPORTED_ANNOTATION_ATTRIBUTE.
  • Deprecated methods in the forms module have been removed: PdfFormField#setDefaultAppearance(String), PdfFormField#setFontAndSize(PdfFont, int), PdfFormField#generateDefaultAppearanceString(PdfFont, float, Color, PdfResources), PdfFormField#getFontAndSize(PdfDictionary), PdfFormField#drawMultiLineTextAppearance(Rectangle, PdfFont, float, String, PdfFormXObject), PdfFormField#drawPdfA1RadioAppearance(float, float, String), PdfFormField#drawPdfA1CheckAppearance(float, float, String, int), PdfFormField#drawPushButtonAppearance(float, float, String, PdfFont, PdfName, float).
  • Deprecated class in the forms module have been removed: com.itextpdf.forms.xfdf.Encoding.
  • Allow to close empty layout document without any exceptions. Logic has been added to add a blank page to a document without pages when it is closed, and PdfPagesTree#generateTree method does not throw an exception in case of an empty document.
  • Make CompareResult class static.
  • com.itextpdf.layout.property has been renamed to com.itextpdf.layout.properties in Java (in .NET it is already so).
  • Make IDENTITY_H be the default encoding for TrueTypeFont fonts.
  • Introduce different embedding strategies: instead of true/false we have now four EmbeddingStrategy values.
  • Make EmbeddingStrategy.PREFER_EMBEDDED be the default embedding strategy for TrueTypeFont fonts.
  • Deprecated method PdfXObject addImage(ImageData image, float x, float y, float width, boolean asInline) has been replaced to PdfXObject addImageFittedIntoRectangle(ImageData image, Rectangle rect, boolean asInline). 
  • Deprecated method PdfXObject addImage(ImageData image, float x, float y, float height, boolean asInline, boolean dummy) has been replaced to PdfXObject addImageFittedIntoRectangle(ImageData image, Rectangle rect, boolean asInline).
  • Deprecated method PdfCanvas addXObject(PdfXObject xObject, Rectangle rect) has been replaced toPdfCanvas addXObjectFittedIntoRectangle(PdfXObject xObject, Rectangle rect) where calculation of transformation matrix was improved.
  • Deprecated method PdfCanvas addXObject(PdfXObject xObject, float x, float y, float width) has been replaced to PdfCanvas addXObjectFittedIntoRectangle(PdfXObject xObject, Rectangle rect) where calculation of transformation matrix was improved.
  • Deprecated method PdfCanvas addXObject(PdfXObject xObject, float x, float y, float height, boolean dummy) has been replaced to PdfCanvas addXObjectFittedIntoRectangle(PdfXObject xObject, Rectangle rect) where calculation of transformation matrix was improved.
  • Deprecated method PdfCanvas addForm(PdfFormXObject form, float a, float b, float c, float d, float e, float f) has been replaced to PdfCanvas addFormWithTransformationMatrix(PdfFormXObject form, float a, float b, float c, float d, float e, float f, boolean writeIdentityMatrix) where writeIdentityMatrix argument was determined.
  • Deprecated method PdfCanvas addForm(PdfFormXObject form, float x, float y, float width) has been replaced to PdfCanvas addFormFittedIntoRectangle(PdfFormXObject form, Rectangle rect) where calculation of transformation matrix was improved.
  • Deprecated method PdfCanvas addForm(PdfFormXObject form, float x, float y, float height, boolean dummy) has been replaced to PdfCanvas addFormFittedIntoRectangle(PdfFormXObject form, Rectangle rect) where calculation of transformation matrix was improved.
  • Deprecated method PdfCanvas addForm(PdfFormXObject form, Rectangle rect) has been replaced to PdfCanvas addFormFittedIntoRectangle(PdfFormXObject form, Rectangle rect) where calculation of transformation matrix was improved.
  • List of exceptions which were extended from checked exceptions but now extends from ITextException (not checked exception): com.itextpdf.barcodes.exceptions.WriterExceptioncom.itextpdf.styledxmlparser.exceptions.ReadingByteLimitException.
  • com.itextpdf.io.image.ImageData#getColorSpace to #getColorEncodingComponentsNumber .

New Features

  • Unified License Mechanism
  • Introduce interface of typography logic and stub implementation at the layout level

Improvements

  •  Case insensitive SVG tags
  •  Jsoup 1.14.1
  •  Throw specific errors when Outline Dictionary breaks PDF specs rules

Bugs

  • Streams remain open in case of exception in PdfDocument/PdfReader constructors
  • PdfPageFormCopier. Multiple widget source field can`t be added to AcroForm when there is a name conflict.
  • Infinite loop in ParagraphRenderer
  • Prevent empty producer line logic
  • No list symbol indention for "Right to left" text
  • Layout: Cell with big rowspan causes infinite loop

eBooks

Installation Instructions

Examples (latest ones)

FAQ (latest ones)

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.