iText Changelog

What's new in iText 5.5.6

May 8, 2015
  • Text 5.5.5 still referred to 2014. Starting with iText 5.5.6, the producer line will mention 2015.
  • resolve some issues with div positioning
  • Body color issue solution
  • Updated Documentation to reflect incompatibilities in table configuration.
  • Wrong Body element processing in PdfDocument. pageEmpty property should be true.
  • Came across a PDF where the /Pages reference pointed to a /Page dictionary and not a /Pages dictionary. This threw an ArrayIndexOutOfBoundsException. This is now handled using an InvalidPdfException (SUP-820)
  • DEV-1259: Issue with wrong implementing UNDERLINE if Chunk has newline symbol inside.
  • Adding a class that can be used to count how many bytes are needed for a specific page (to be used in the context of PdfCopy).
  • BarcodeQRCode: add a method for drawing qr code directly on canvas.
  • (SUP-766) TIFF offsets are absolute (starting from the start of a file). I changed a seek that was happening relative to the current pointer.
  • Fix for incomplete table (DEV-1260)
  • CompareTool: fix StackOverflowError in case of repeated recursive objects comparison.
  • DEV-1302: Updated error messages for PdfArray PDF/A-1 compliance
  • Changed faulty error message DEV-1302
  • Tagged PDF: Prevent infinite loops when there is a missing entry in the NumTree of the StructureTreeRoot. DEV-1293 SUP-854
  • Added classes for path abstraction
  • Modified PdfContentStream to be able to process path construction and painting, extended existing render listener
  • Improving Tab stop implementation for RTL writing direction
  • Added operators for W and W* in PdfContentStreamProcessor, fixed currentPoint initialization in Path, added new callback in ExtRenderListener interface
  • Processing of nested lists in ColumnText. List items are disappeared after nested list if the nested list has bottom nested list. SUP-879 Nested List items not displaying properly
  • SUP-883 preventing an arrayindexoutofboundsexception when assertions are enabled
  • SUP-761 Text Extraction returns identical coordinates
  • Refactored code (Removed unused awt.Shape from parser.Shape hierarchy, changed some constants from byte to int due to inconvenience in use and also did some other small changes)
  • Tagged Pdf: make the localDestinations (DESTS) a NameTree. DEV-1302
  • (IT-57) convert line endings for text files to LF
  • Refactored code
  • DEV-1333 XmlWorker: Fixed incorrect line spacing calculation in html lists.
  • DEV-1271 Fixed leading applying.
  • Added file header for DocumentLayoutTest.
  • Fixed resolving of numbers with multiple minus signs in PRTokensier.
  • updated check to include the header offset
  • BaseFont: update spaces.
  • DEV-669: Precision Fix.
  • added constructors to allow ExternalDecryptionProcess to be used with a byte[] or an inputstream (DEV-1361)
  • Remove duplicate setting of base font name.
  • Arabic characters with missing ligaturized glyphs should be able to fall back to non-ligaturized variants. These are mapped in the ArabicLigaturizer anyway, so I simply added a reverse mapping. JIRA tickets: SUP-911 DEV-1367
  • Fixed performance issues with PdfCopy (DEV-1368).
  • Port Clipper library from C# to Java (DEV-1369)
  • Fixed bug causing infinite loop in Merging PDFs with incomplete Num Tree (DEV-1293)
  • Fixed bug with stamping PDF with identical Contents array (DEV-1384)
  • Explicitly set LF endings for text files.
  • (DEV-1384) When stamping, differentiate between pages if they have the same Contents array
  • Eliminated double entries in Nums entry of ParentTree. DEV-1359
  • Check PDF/A-2 and PDF/A-3 compliance when signing (DEV-1378)
  • Add support for text in CMYK to PdfGraphics2D
  • Ported e770bc17 (Added possibility to apply piecewise linear approximation to Subpath)
  • Replaced usages of int (32 bit) with long (64 bit) in the Clipper library, refactored the code a bit
  • (Updated CleanUp tool to be able to process partially covered line arts. Graphics state parameters, such as miter limit, line joins, line width etc. are not processed yet)
  • Clipping: Added processing for line width, line cap style, line join style.
  • Clipping: Fixed method for getting piecewise linear approximation of subpath so that now it returns list of points with no duplicates, added another version of the method AddAll to Util, removed Obsolete annotation from Path.ReplaceCloseWithLine.
  • Pavel Mitrofanov Replaced PdfCleanUpGraphicsState with existing GraphicsState from itext.pdf.parser package, added missing parameters into the latter
  • 2015-05-04 Pavel Mitrofanov DEV-1380: Fixed incorrect processing of closed dashed subpaths (the effects of line join between the last and the first segment of a subpath was lost)
  • 2015-05-04 Pavel Mitrofanov DEV-1325: Fixed CleanUp tool behavior when a clipping path is being completely removed. Starting from this moment, all the content, which was invisible due to a clipping path, won't be written to the resultant document, if the clipping path is completely cleaned.
  • 2015-05-01 Raf Hens (DEV-1377) Fixed PdfPTable.setKeepTogether() when using a tagged writer
  • 2015-05-04 Alexey Subach BaseFont: avoid synchronization of fontCache and using ConcurrentHashMap instead.
  • 2015-05-06 Pavel Mitrofanov Fixed bug (wrong PDF operator was written into content stream instead of fill color operator).
  • 2015-05-06 Amedee Van Gasse first version of contribution guidelines
  • CONTRIBUTING.md describes how users can send pull requests to iText.
  • 2015-05-06 Pavel Mitrofanov DEV-1379: Fixed bug (There were no Bevel join in the Clipper library. There is square join instead, which adds extra delta (linewidth / 2) at each convex edge)
  • 2015-05-06 Yulian Gaponenko Removed deprecated logic of saving and restoring color for tagged pdf documents in PdfContentByte class (DEV-1371).
  • pdfa
  • Date Developer Message
  • 2015-03-11 Pavel Mitrofanov SUP-817: Added temporary fix for bug related to font synchronization, fixed bug related to incorrect font caching
  • 2015-03-20 Benoit Lagae Adapted rule + error message in PDF/A compliance checker classes, and also tests for the changed behavior. DEV-1302
  • 2015-03-31 Benoit Lagae Tagged Pdf: test for iTextPDF commit: make the localDestinations (DESTS) a NameTree. DEV-1302
  • 2015-04-06 Dmitry Trusevich DEV-1303 Verify restrictions in PDF/A checks
  • 2015-04-24 Amedee Van Gasse Normalize line endings. Please don't forget to use -w when using diff or blame!
  • 2015-05-06 Amedee Van Gasse first version of contribution guidelines ...
  • CONTRIBUTING.md describes how users can send pull requests to iText.
  • rups
  • Date Developer Message
  • 2015-04-03 Michael Demey changed close behavior
  • 2015-04-03 Michael Demey added a public static int to allow different kind of close operations. This allows people using RUPS in their own projects without RUPS shutting down the JVM unwanted.
  • xmlworker
  • Date Developer Message
  • 2015-02-16 Pavel Morozov resolve some issues with div positioning
  • 2015-02-16 Eugene Markovskyi Paragraph indents are mirrored in case RTL layout. It is done on Element processing level, not on CSS applying level.
  • 2015-02-17 Pavel Morozov Body color issue solution
  • 2015-02-18 Pavel Morozov Wrong Body element processing in PdfDocument. pageEmpty property should be true.
  • 2015-02-19 Pavel Morozov DEV-1252: Several bugs about analyzing font styles are fixed
  • 2015-02-24 Raf Hens Handle unquoted url() values
  • 2015-02-27 Pavel Morozov Css At-Rule issue is fixed. Jira DEV-128.
  • 2015-03-02 Pavel Morozov DEV-61: Wrong processing star comments (/* */)
  • 2015-03-06 Eugene Markovskyi SUP-800 xdp with fragments
  • 2015-03-11 Eugene Markovskyi SUP-662 Arabic content loosing html styles after converting from HTML to PDF
  • 2015-03-20 Pavel Morozov resolve strikethrough issue
  • 2015-03-26 Yulian Gaponenko Removed using of NoImageProviderException in non-exceptional flow.
  • 2015-03-26 Benoit Lagae XMLworker should ignore the CSS attribute "tab-stops ", instead of not showing contents of HTML tags with that attribute. DEV-1296
  • 2015-03-30 Alexey Subach DEV-1287 XMLWorker ignores tag at the end of tag. Do not cut tags from paragraph items at all.
  • 2015-03-30 Eugene Markovskyi Correct Accessible PDF role for TH HTML tag
  • 2015-04-06 Yulian Gaponenko DEV-1333 XmlWorker: Fixed incorrect line spacing calculation in html lists.
  • 2015-04-07 Yulian Gaponenko DEV-1271 Fixed leading applying.
  • 2015-04-07 Yulian Gaponenko DEV-986 Fixed css parsing of @rules.
  • 2015-04-08 Raf Hens DEV-1360 Not all InputStreams support mark/reset
  • 2015-04-29 Yulian Gaponenko Fixed list rendering.
  • 2015-05-04 Alexey Subach Process in tags content. Avoid synchronization in CssUtils.
  • xtra
  • Date Developer Message
  • 2015-03-01 Bruno Lowagie Adding a class that can be used to count how many bytes are needed for a specific page (to be used in the context of PdfCopy).
  • 2015-03-02 Pavel Mitrofanov DEV-1264: Fixed incorrect affine transformations caused cutting of incorrect image regions when the image was rotated or scaled, added additional test
  • 2015-03-03 Bruno Lowagie Tool that allows you to split an existing PDF file in separate PDFs that do not exceed a predefined size.
  • 2015-03-11 Pavel Mitrofanov DEV-1251: Added javadoc's for PdfCleanUp, refactored some code there.
  • 2015-03-17 Pavel Mitrofanov Changed NotImplementedException to UnsupportedOperationException since the sun packages are not part of the supported, public interface (http://www.oracle.com/technetwork/java/faq-sun-packages-142232.html)
  • 2015-03-27 Pavel Mitrofanov Improved CleanUp tool: now it can also process completely covered line arts.
  • 2015-04-01 Pavel Mitrofanov Refactored code (Removed unused awt.Shape from parser.Shape hierarchy, changed some constants from byte to int due to inconvenience in use and also did some other small changes)
  • 2015-05-01 Pavel Mitrofanov Updated CleanUp tool to be able to process partially covered line arts. Graphics state parameters, such as miter limit, line joins, line width etc. are not processed yet
  • 2015-05-04 Pavel Mitrofanov Added processing for line width, line cap style, line join style).
  • 2015-05-04 Pavel Mitrofanov Added processing for line dash pattern (closed path is processed a bit incorrect now)
  • 2015-05-04 Pavel Mitrofanov Replaced PdfCleanUpGraphicsState with existing GraphicsState from itext.pdf.parser package, added missing parameters into the latter
  • 2015-05-04 Pavel Mitrofanov Added static field to PdfCleanUpProcessor, allowing to prevent cleaned area from being filled (it's quite convenient for testing purposes)
  • 2015-05-04 Pavel Mitrofanov Fixed bugs (transformation of annotation's rect, EndType value when doing offsetting for path using Clipper library, clipping rule, stroke to fill color
  • 2015-05-04 Pavel Mitrofanov DEV-1380: Fixed incorrect processing of closed dashed subpaths (the effects of line join between the last and the first segment of a subpath was lost)
  • 2015-05-04 Pavel Mitrofanov DEV-1325: Fixed CleanUp tool behavior when a clipping path is being completely removed. Starting from this moment, all the content, which was invisible due to a clipping path, won't be written to the resultant document, if the clipping path is completely cleaned.
  • 2015-05-04 Pavel Mitrofanov DEV-1374: Redesigned CleanUp Render-Filter architecture so that now there is only one filter responsible for all areas to be cleaned from a document
  • 2015-05-05 Pavel Mitrofanov Replaced Clipper library port with the correct one, refactored CleanUp code
  • 2015-05-06 Pavel Mitrofanov Fixed bug (wrong PDF operator was written into content stream instead of fill color operator)
  • 2015-05-06 Pavel Mitrofanov DEV-1379: Fixed bug (There were no Bevel join in the Clipper library. There is square join instead, which adds extra delta (linewidth / 2) at each convex edge)
  • 2015-05-07 Pavel Mitrofanov Changed ArrayDeque to Stack since the former is not supported in Java 5.

New in iText 5.5.5 (Feb 13, 2015)

  • Text extraction. Handled specific case where a font's charSpace width is compensated with negative character spacing and results in a 0 width, causing LocationTextExtractionStrategy.getResultantText() to assume that there's a space after every character.
  • Clean-up functionality. Fixed incorrect handling of the " operator.
  • Clean-up functionality. Added possibility to recover text by character widths
  • Tagged PDF. Fixed NPE when modifying content of Tagged PDF document.
  • Security issue. Protecting against XEE attacks
  • Changes made by Pavel Morozov
  • XML Worker. Fixed some div width calculation issues.
  • Changes made by Eugene Markovskyi
  • XML Worker. Support for Div text-align.
  • XML Worker. Arabic content was loosing html styles after converting from HTML to PDF
  • Changes made by Alexey Subach
  • Word hyphenation. Fix getting word boundaries: digits were not taken into account, so that "att5ention" word was split into "att" and "ention", and then hyphenation event was called only for "ention" part, but it should be called for the whole word "att5ention".
  • AcroForms. Fix regenerating AcroFields appearances for check boxes (Duplicate appearance in flattened check box).
  • Barcodes. Fix to Barcode128 CodeSet parameter backwards compatibility.
  • Barcodes. Edited the BarcodeQRCode constructor description to inform users that UTF-8 encoding can be used (it is not guaranteed, however, that all the decoders will decode such barcode correctly because UTF-8 is not supported by the specification).
  • Barcodes. BarcodePDF417: add placeBarcode method for placing a barcode right on PdfContentByte.
  • CompareTool. generate more verbose report on differences,
  • CompareTool. new configuration: setCompareByContentErrorsLimit method for setting maximum number of comparison errors,
  • CompareTool. setGenerateCompareByContentXmlReport method for generating xml report on differences.
  • CompareTool. include StructTreeRoot into compareByContent.
  • CompareTool. add offsets to item path for string and streams failed comparison.
  • CompareTool. fix false positive issues in: compare the dictionaries over the union of their keys, not only by the cmp dict keys.
  • CompareTool. Include comparison of dictionaries in the comparison of streams.
  • CompareTool. Comparison of /OCProperties entry in catalog is called in compareByContent.
  • Text extraction. Support for Identity CMap in DocumentFont (metrics were not filled properly).
  • CompareTool. fix compare console commands for paths containing spaces.
  • Changes made by Pavel Mitrofanov
  • Clean-up functionality. Added processing for partial glyph covering.
  • Clean-up functionality. Added processing for image covering.
  • Clean-up functionality. Words were shifted after cleaning up.
  • Clean-up functionality. Fixed incorrect storing of graphic state parameters.
  • Clean-up functionality. Fixed issues with Form XObjects when removing content.
  • Clean-up functionality. Fixed NullPointerException caused by incorrect image redaction: the redacted image was written to a content stream as a new image, but the old one was deleted, causing an exception when the image was used elsewhere in the same PDF.
  • Clean-up functionality. Smasks were destroyed if we redacted masked image.
  • Changes made by Bruno Lowagie
  • Text extraction. Introducing a fillDiffMap() method in DocumentFont, so that the functionality to extract the Differences array that is used for Type1/TrueType fonts, can also be used for Type3 fonts.
  • AcroForms. Apparently, there are forms where the encoding isn't stored in the font, but in the resource dictionary. The ISO specification doesn't mention that this is possible, but this commit looks for such an encoding if none is specified for the font.
  • Text extraction. Support for the Identity CMap.
  • Fix. When adding a table is added to a ColumnText object, the original table instance is altered (e.g. a fixed height of a cell is introduced). This causes problems if you first add a table in simulation mode, and then try adding the table for real.
  • Fonts. When a Type 1 font is not embedded, we should not subset it. If we do, we risk adding 0 as the width of glyphs that are not used in an appearance, but that could be used in the context of a field (such as an option in a Choice field).
  • Adding the correct Widths array will result in a file size that is substantially higher, but only in cases where we use an encoding that is different from the standard encoding.
  • AcroForms. If an annotation isn't really an annotation, but for instance a field that doesn't have a widget annotation, the /P entry shouldn't appear in the field dictionary.
  • Changes made by Michaël Demey
  • Fonts. Updated the documentation to reflect the experimental status of support for Devanagari.
  • Changes made by Benoït Lagae
  • Text extraction. Implemented an extra check to avoid parsing the empty String (casing an ArrayIndexOutOfBoundsException).
  • Tagged PDF. setAccessibleAttribute() did not have the desired effect when used with PdfName.ID. A tagged PDF with ID entries must also have an IDTree.
  • Tagged PDF. Provided a better solution for table summary (in PDF-UA).
  • Tagged PDF. An element in Tagged PDF must be able to add the Title (PdfName.T) directly to its root. Also updated documentation for a few PdfName literals, because they were confusing: LANG vs LANGUAGE, ALT vs ALTERNATE, etc. See SUP-802 for the trigger.
  • Changes made by Raf Hens
  • Fix. PDF/A-1: fix outputintent RGB check.
  • Changes made by Paulo Soares
  • Fonts. Acces table GSUB is directly by a RandomAccessFileOrArray.
  • Fonts. GSUB Lookup type 1 Format 2.
  • XML Worker 5.5.5:
  • Added support for shorthand border property in tables: border-bottom and etc.
  • Changes made by Pavel Morozov
  • Fixed some table width calculation issues.
  • Changes made by Alexey Subach
  • Fix for table colspan and fixed widths error.
  • Support for Div text-align
  • Arabic content was loosing html styles after converting from HTML to PDF
  • Changes made by Benoït Lagae
  • Added better support for run direction (RTL or LTR) in nested tables, and via a CSS property instead of a tag attribute.
  • XFA Worker 5.5.5:
  • (This is a closed source project on top of iText and XML Worker.)
  • Solved missing image problem (due to wrong subform positioning) and missing page problem.
  • Added support for shorthand border property in tables: border-bottom and etc.
  • Expose Javascript errors.
  • Fixed a problem where an embedded font was removed by XFA Worker
  • Form package parsing, pre-implementation of form package handling (not yet active; research only)
  • Invalid XFA color causes problem during flattening process
  • Fix: auto-sized text wasn't flattened.
  • Changes made by Alexey Subach
  • Added JavaScript fontColor property. Fixed font color parsing.
  • Added hyphenation support.
  • Fixed data binding issues: check for possibility to bind siblings before duplicating parent subform
  • Support for PDF417 barcodes.
  • Deal with tabulation chunks in barcodes.
  • Fixed calculate script evaluation: do not update rawValue if the result is a function.
  • Process Linethrough font tag attribute in fields.
  • Improve 1D barcode properties and sizing support.
  • Fix bug with barcode fields overflowing.
  • Fixed NullPointerException in getSignatureFields() in case of flattening from XDP package.
  • Fixed paragraph margins for right-to-left text elements.
  • Dealing with infinite event executions in case of recursive subform instantiation.
  • Enable resolving of $record entries in SomExpressions.
  • Added search for base fonts if font directory is specified in XFAFontSettings.
  • Changes made by Alexander Chingarev
  • Fix: Flattening of signature element didn't work in case of unnamed subforms.
  • Changes made by Pavel Mitrofanov
  • White space contained in a spacerun-style element wasn't preserved correctly.
  • Fixed problem with excess white space.

New in iText 5.5.4 (Dec 29, 2014)

  • Ignore broken annotations when flattening FreeText annotations.
  • Do not add DigestValue, DigestLocation and DigestMethod fields when signing PDF documents of version 1.6 and higher as it breaks PDF/A-2 conformance.
  • PdfAChecker threw PDF/A-2 conformance exceptions when a PdfAction chunk was added to the document.
  • CompareTool refactoring: methods for object comparison have been made public.
  • Improved the TextRenderInfo class regarding the calculation of widths of text snippets and unsupported encodings.
  • Fixed an issue when searching for a CJK compatible font.
  • Added a marker for those parts of the code that aren't compatible with Android.
  • Fixed the exception "alt.entry.should.specify.alternate.description.for.figure.element" for PDF/A-1a file creation.
  • Fixed java.lang.IndexOutOfBoundsException when validating signature conformance to PDF/A-2 (reported by Axel Burri)
  • Added ZUGFeRD extension levels (basic, comfort, extended).
  • Added PDF "clean up" functionality that can be used for redaction.
  • Fixed a text overlapping issue in the Div layout. The issue used to occur if a paragraph overflowed a page bottom boundary only with "spacing after".
  • Fixed an issue with fonts that weren't being embedded in specific circumstances.
  • Added support for RTL in a bulleted list and processing of the "dir" attribute in the table-tag (XML Worker). Improved table alignment in case of RTL direction.
  • Improved Barcode128: add possibility to strictly use provided code set (A, B, C). AUTO mode is left for backwards compatibility as default mode.
  • Added an isWordSplit() method to ColumnText to check if any word was split into several parts (if there was not enough width for the whole word).
  • Support of justified alignment for right-to-left text.
  • Added new pdf names (RO, REDACT, OverlayText, Repeat) and changed the return type of the PdfContentByte.addFormXObj() method so that it returns a PdfName instead of void.
  • For some reason, we explicitly forbid to change the dimensions of a push button. However, I do not remember this reason. See also iText: button resize affects label on StackOverflow.
  • Making sure that the getDigestAlgorithm() returns SHA1withRSA if the constructor with params (byte[], byte[], String) is used.
  • Updated PdfStamperImp so that a PDF is automatically tagged when a Tagged PDF is being manipulated (instead of having to enable tagging manually).
  • Fixed a typo in the string that is used to indicate a col span: it was Colspan; it's now ColSpan.
  • Bugfix: the length of a stream could be defined as a negative length.
  • An incomplete PdfPTable would sometimes ignore headers and drop the first rows of each page.
  • Some changes to PdfGraphics2D concerning manual creation of bold & italic fonts when there are incomplete font sets (e.g. only plain & bold, or only plain & italic).
  • PdfGraphics2D: moved the underline a bit lower so that manually created bold fonts do not overlap with the underline.
  • PdfGraphics2D: removed restriction that a bold font will only be simulated if we have a custom strokeWidth.
  • Added the PdfName for the Summary tag that can be set to a PdfPTable in a Tagged PDF document.
  • In Tagged PDF, a PdfPTable must have an Owner entry (/O) in its element dictionary for Acrobat to consider the table valid, otherwise the Summary check will fail.
  • Make it possible for users who already have a Random Access File to still take advantage of the createBestSource() logi

New in iText 5.5.3 (Sep 18, 2014)

  • Added IM (ImageMask) as a name to PdfName.
  • Change of the access modifiers to public for the escapeString methods in the PdfContentByte() class and migration of these methods to the StringUtils class.
  • Bugfix in CompareTool: proper comparison of null PDF objects.
  • CompareTool refactoring.
  • Fixed issue in datamatrix barcode. In some special cases the last symbols should be coded in ASCII, instead of placing Unlatch symbol.
  • Fixed issue with PdfCopy when merging fields with the same name.
  • Fixed issue with PdfCopy where annotations got lost because of confusing PdfIndirectReference and PRIndirectReference in the updateAnnotationReferences() method.
  • Fixed issue with PdfCopy when copying some types of AcroFields (comments and markup).
  • Changed the type of the permissions value from int to long for 128-bit ARC4 passwords (See question iTextSharp cannot open files with password if 128 bit rc4 on StackOverflow).
  • Fixed issue with PdfStamperImp: Regenerate fields and add /Matrix in case the size of the field's rectangle and the bounding box of the appearance stream are different.
  • Fixed issue with form field creation in PDF/A (adapting the PDF/A checkers).
  • CompareTool improvement: decode streams before comparing.
  • Fixed the PdfReader constructor that uses an external decryption process by adding a Certificate as a parameter as the certificate is always needed for correct decryption.
  • Fonts: write text by glyph id.
  • Try to generate appearances when flattening, to avoid the many questions about the missing appearances when the document itself thinks that no appearances are needed.
  • Made the process of getting the current iText version synchronized.
  • Added the setVisibleTopChoice() method to TextField. This sets a choice field list's first visible option.
  • PdfCopy didn't keep track of the current page number in its writer instance.
  • Added an extra check for the isTagged() method.
  • Fixed issue with the "spacing after" functionality.
  • Deal with floating elements inside a Paragraph before finalizing the process of adding that paragraph.
  • OCGRemover now removes OCProperties if the last OCG got deleted. Also deletes pagemode if it was set to UseOC (the default is USENONE, but this is an optional entry).
  • Flattening of annotations with appearance streams is now supported.
  • Fixed an issue where iText continued reading after an unsupported inline image was found, resulting in the exception "Could not find image data or EI". This fix stops reading after an unsupported image was encountered. The fix was improved by Kevin Day.
  • Sometimes the height check in `PdfDocument` exceeds the page height in cases where no content was added. This resulted in an empty page. This undesired effect was fixed.
  • Fixed issue with FileChannelRandomAccessSource: throw checked IOException for 0 size files instead of the IllegalArgumentException that was thrown, which could result in the underlying channel not being released by the caller.
  • More refined check of whether the inline image stream has been fully read or not when parsing PDFs.

New in iText 5.5.1 (May 20, 2014)

  • Fixed incorrect element tagging when a template image is added to the document.
  • Added pdfaExtension schema to XMP metadata in order to add support of the PDF/A-* and PDF/UA standard simultaneously in a single PDF document.
  • New functionality: Image and PdfTemplate can now be added to FDF file as field values.
  • Bugfix: FdfReader should not close input source automatically. Otherwise we cannot read stream data.
  • Important consequence: you are now responsible for closing the input source in your code!
  • Bugfix in PdfAChecker: there was an issue with PDF/A validation of PRIndirectReference objects.
  • TaggedPdfReaderTool: removed dependency on java.nio.charset.Charset to avoid issue with default charset on linux.
  • TaggedPdfReaderTool: add alt attribute of tag structure to output xml.
  • TaggedPdfReaderTool: fix issue with null-symbol in alt text attribute.
  • CompareTool speedup, add compareByContent() method.
  • CompareTool: fix issue with comparing tag structure.
  • CompareTool: fix issue with PdfBoolean and PdfArray comparing.
  • Refactoring of the verification of output intents in the Pdf/A checker classes.
  • When a Chunk is a link, tagged PDF requires that an accessible attribute is added. We also add alternate text for link annotations.
  • Tagged PDF and form fields: widget annotations can now be tagged.
  • Better support for gradient colors
  • LAB color space support
  • Fixed link comparison in CompareTool: we compare the pages the links refer to, not the page references. We don't compare if the links are external. We compare the boxes of the links and simple parameters (all except dictionaries, arrays and indirect references).
  • Added a new setType(PdfArtifact.ArtifactType) method for PdfArtifact and throw an exception in setType(PdfString) if the string parameter is not a valid artifact type.
  • FDF: added status message functionality
  • Added support for the ZUGFeRD standard (which is based on PDF/A-3)
  • Bugfix for creating PolyLine annotations (actually fixing a typo).
  • Added a missing break; statement in PdfAXmpWriter
  • XMP: ignore empty or whitespace only keywords.
  • Bugfix CompareTool: check to prevent NullPointerException; new File(compareExec).exists(); throws an exception if compareExec is null.
  • Flattening a form would overwrite AP streams of annotations when it shouldn't. Reverting a commit from February 8, 2013 fixed this issue.
  • Replaced redundant code with a call to the keepRowsTogether() method and updated its Javadoc comments to include thrown exceptions.
  • An issue with "ImageMasks that have uncompressed bitmap data" was reported on the mailing list. User Darren correctly pointed out that 0 can be a whitespace. Added additional checks on ch == '0' in the readLineSegment() method. This method was being called from two places: rebuildXref() and checkPRStreamLength().
  • Fixed the formatting of the checkPRStreamLength().
  • Fixed a bug that cut off rows of nested tables even though they fitted in the available space. The culprit was rowsNotChecked not being copied in a PdfPTable.shallowCopy() method.
  • Fixed a problem regarding invisible signatures. For the full explanation, see the mailing-list discussion Possible bug on PdfSignatureAppearance. We accepted the proposal made by Emanuele Paterna.
  • Bugfix regarding spacing before and after when a new page is created.
  • bugfix TIFF: "EOL code in white run" threw an exception when it could end reading the white run. Also avoided an ArrayIndexOutOfBoundsException.
  • Avoiding a NullPointerException in PdfReader: you can't read a stream that is null.
  • Bugfix: When compressing a stream that was already compressed using at least one different filter, the FlateDecode key needs to be added first.
  • New Image functionality: Suppose that you have a JPEG image, then the filter used by iText will be /DCTDecode. Suppose that you want to compress the image even more, then you may want to add /FlateDecode as a filter. This is no possible by choosing a compression level different from "default compression" and "no compression".
  • New AcroField functionality: it is now possible to set the value of /AS if the normal appearance doesn't provide two states to choose from.
  • Bugfix PdfA1Checker: the value of outputIntentDictionary was checked for a null value at a point that could never be reached if outputIntentDictionary was null: a NullPointerException would have been thrown when getting the value of the /S entry. (This was eventually refactored by Eugene.)
  • Added an extra method to add JavaScript to PdfStamper as explained on StackOverflow.
  • Added a method to define the rendering intent to PdfContentByte (to complete the list of general graphics state operators).
  • In PDF 2.0, inline images will be limited to images of maximum 4 KB. We've already anticipated and added the new /L key (specific to PDF 2.0). We've put the code that throws an exception in a comment section, just so we don't forget when we work on PDF 2.0.
  • Implemented a suggestion made by Vahid Nasiri who says that dropping formatting chars causes problems in FontSelector. Alexey Subach improved the fix.

New in iText 5.4.4 (Sep 16, 2013)

  • Performance improvement: replacing AccessibleElement UUID with AccessibleElementId
  • Table borders and backgrounds in tagged PDF are now artifacts.
  • Tag image correctly when adding it directly to document (not wrapping to chunk).
  • Fixed a problem with incorrect link insertion into structTree.
  • Fix: annotation structures are now properly copied when merging documents with PdfCopy/PdfSmartCopy.
  • Removed obsolete PdfCopy functionality.
  • Fixed issue with mixed tages when merging tagged PDF documents with PdfCopy.
  • Deprecating PdfCopyFields
  • PdfCopy: introduced a method that allows you to add a document, preserving the form fields.
  • Content parsing: fix for color parsing.
  • Fixed bug in GetCOName() in PdfCopy (formerly in PdfCopyFields)
  • Improve memory usage in PdfStructureElement.
  • Replaced the iText XMP implementation with Adobe's XMP Core library
  • Fixed incorrect line wrapping for Chinese characters. Type0 DocumentFont should use the metrics of DescendentFont(/DW, /W...) instead the predefined ones in cjkMirror(CJKFont). Unfortunately the fix look like a workaround because we've tried to keep backward compatibility. Refactoring of the font functionality is scheduled for 2014.
  • Respect the NeedAppearances setting of a PDF that is read, set generateAppearances accordingly.
  • PdfCopyFields: Enable NeedAppearances in the output when one the input documents has it enabled.
  • Fix for inline images that have 1 byte more than expected.
  • Added support for TIFFs with "new style" JPEG compression and photometric RGB.
  • PdfWriter.getBoxSize now has an overloaded method that returns the intersection of a box (crop, bleed, art, ...) with the given rectangle.
  • Fix: Signed attributes aren't always DER encoded.
  • Fix: Make sure the correct digest algorithm is used; subfilter adbe.pkcs7.sha1 only supports SHA1 as subfilter.
  • Make sure you can use OCGRemover in case the /Contents of a page is represented as an array instead of as a stream.
  • OCG functionality: Add some checks to avoid a NullPointerException.
  • Experimental code to flatten forms in a tagged PDF, preserving the accessibility (Section 508).
  • Dealing with PDFs of which the root of the page tree refers to an object with number 0 (invalid PDF syntax), throwing an InvalidPdfException instead of a NullPointerException.
  • Dealing with PDFs of which the root of the page tree refers to an object that doesn't exist (no page tree available), throwing an InvalidPdfException instead of a NullPointerException.
  • Dealing with PDFs of which the root dictionary is missing, throwing an InvalidPdfException instead of a NullPointerException.
  • When an InvalidPdfException is encountered, objects shouldn't just be considered as being "null" (unless in debugmode, for instance when you want to look at the file using RUPS).
  • Bugfix: The end-of-line marker may not be taken into account when measuring the length of a stream.
  • Bugfix: flattening fields didn't work if a combined field/widget dictionary was present in the Fields array, but not in the page Annots.
  • Fixed ArrayIndexOutOfBoundsException reported by Ivan Gregor in case an existing PDF has empty ID values.
  • PdfImage: moved the code that deals with transparency outside the "Raw Image" area as proposed by Ivan Gregor.

New in iText 5.1.3 (Nov 13, 2011)

  • maintenance release that fixes a series of bugs and that allows us to release the new version of XML Worker that depends on iText.

New in iText 5.0.6 (Feb 4, 2011)

  • Changes made by Paulo Soares:
  • Added an event to signal that a table will continue in the next page (adapted from code from Nurettin Dag).
  • HTMLWorker: relative cell widths are supported in tables (Samuli Tuomola).
  • Tagged XML extraction didn't consider indirect /K objects or page contents with an array.
  • PdfStamper: non pdfdocencoding characters were being wiped out from the producer name.
  • TiffImage: images with 1 bit per pixel may also use a pallete.
  • Added RectangleReadOnly.setRotation() override to throw an exception if a read only Rectangle is changed.
  • Parsing PDF:
  • CMapAwareDocumentFont: Some PDFs have a diff map bigger than 256 characters.
  • CMapParser: Fix to read broken ToUnicode cmaps.
  • Cache the fonts used in text extraction.
  • Changes made by Mark Storer:
  • Added basic support for rich text values in form fields. No appearance support as yet.
  • added support for web hex colors without a leading '#', and some tests.
  • The meaning of transparent (0 or 0x00) and opaque (1, 255, or 0xFF) was switched in the WebColors class.
  • Changes made by Kevin Day:
  • PDF parser: handle slightly malformed embedded images
  • Changes made by Balder Van Camp
  • Clean-up of different classes and methods
  • Improved MessageLocalization - removed methods getComposedMessage(...) and replaced with 1 that handles all for unlimited {1} .. {x} replacement parameters
  • removing unnecessary brackets
  • objects implementing equals should implement hashcode too
  • ...
  • Performance and memory optimalisations:
  • calling new Long() or Integer() causes memory allocation .valueOf() is more memory friendly.
  • changed creation of Characters in EntitiesToSymbol, EntitiesToUnicode, IanaEncodings
  • strings += in loops replaced by stringbuilder/buffer append
  • Reorganization of the code
  • Separated resources from Java code
  • Removed the dependency on HtmlTags in Font used by setStyle(String style)
  • Removed dependency on HtmlTags in attempt to separate xml parsing from html parsing to allow creating different modules from different parts of itext.
  • Introduced NewLineHandler/NeverNewLineHandler that takes over the task HtmlTags was doing
  • New class XMLUtil contains utility methods, some methods previously found in SimpleXMLParser
  • Changes made by Bruno Lowagie:
  • Reorganization of HTMLWorker and related classes
  • Patch #3044060 by Nurettin Dag: padding-left was ignored when parsing HTML with HTMLWorker
  • Patch #3044063 by Nurettin Dag: bullets generated from HTML need extra space
  • Patch #3044071 by Nurettin Dag: making some private variables protected so that users can access them from a subclass.
  • Patch #3044077 by Nurettin Dag: When a paragraph containing an image is converted to PDF using HTMLWorker height of the line is calculated only by the size of the text in it. The calculation of lines containing images should consider the image height as well.
  • Patch #3044496 by Nurettin Dag: support for table alignment in HTMLWorker.
  • Patch #3105516 by Nurettin Dag: Using HTMLWorker if a table has alignment defined it also applied to rows in the table (and it shouldn't).
  • Patch #3044568 by Nurettin Dag: Whitespace in HTML isn't always ignored when it should be
  • Static final String values for HTMLWorker providers. See suggestion by Keith O. on the mailing list.
  • Rewrite of HTMLWorker introducing an HTMLTagProcessor interface
  • Adding a new constructor for HTMLWorker taking a Map of tags and HTMLTagProcessor objects
  • Replacing hard coded Strings by a static final String.
  • Removing ElementTags and Markup in favor of HtmlTags.
  • RUPS: XFA Tree should be scrollable.
  • Adding a type to the structure element as suggested by Jose (jmrrva).
  • Patch #3044413 by Nurettin Dag: sometimes when an image does not fit the current page it is still flushed to that page instead of getting pushed to the next page.
  • Patch #3105505 by Nurettin Dag that gives users control over the spacing between image and the line above.
  • Patch #3105552 by Nurettin Dag: Y-line value is wrong when a table has a spacing after that extends to below the bottom margin.
  • Patch #3105584 by Nurettin Dag: introduction of scaleToFitLineWhenOverflow a parameter that lets you decide if iText needs to scale an image down if it doesn't fit the available width of the page.
  • Fixed bug #3114043: when content really doesn't fit a row, iText should throw an Exception instead of printing the error message to the PDF
  • Removed the main() methods from GreekAlphabetFactory, RomanAlphabetFactory, RomanNumberFactory, Pfm2afm, Base64, CMapParser and SimplePatternParser.
  • Fixed problem with existing OCGs by avoiding a NullPointerException as suggested by R Bolotov on the mailing list (24/01/2011 18:31)
  • Added Rectangle and RectangleReadOnly constructors that accept a rotation value.
  • Added a setRotation() method that sets the rotation to 0, 90, 180, or 270.
  • Added some extra short-cut variables to create page size with Landscape orientation.

New in iText 2.1.7 (Jul 29, 2009)

  • PdfPKCS7: More robust timestamp extraction.
  • PdfPKCS7: Ripemd didn't work, some kind of signed attributes couldn't be verified correctly.
  • PdfStamperImp: Avoid accessing directly member variables from other classes.
  • PdfSmartCopy: Check deeper for comparison.
  • Rotation in PdfPCell: take mod before making positive.
  • Fix NPE when parsing Type 0 fonts without a ToUnicode map (I've seen some winding font entries stored as Type 0 instead of TT in some pdf files)
  • Adjusted unicode tcid mapping sit takes the first one found from DocumentFont. This is just a band-aid, as it doesn't address cases where multiple cids may map tsingle unicode value.
  • Fix byte tint sign conversion
  • Enhance text parsing thandle fonts with encoding but nToUnicode map. Ref Bug #2792227
  • PdfPRow: Cheating a little bit more tdeal with a floating point problem (until we can solve this in a more structural way)
  • PdfPTable/PdfPRow/PdfPCell: Fix a bug for the new rowspan funtionality
  • PdfStamperImp: Solved NPE problems with producer string
  • Image in Chunk: Taking intaccount the top border width of the Image in case the leading has tbe changed taccommodate for the image height.
  • RtfList: The public void writeContent(final OutputStream result) method needs toutput RtfParagraph.PARAGRAPH_DEFAULTS after every list. Patch posted anonymously tSF (#2809140).
  • RtfFont: When adding a paragraph, table cell or other Phrase without specifing the font, by default the "unknown" font is created in the font table. Like: {f3fromanfcharset0 unknown;} Word 2000 doesn't recognise the unknown font and waits indefinately. Patch provided by M. Smith on the SF Bugtracker (#2807621)

New in iText 2.1.5 (Mar 10, 2009)

  • PNG image not rendered correctly in PDF if it had transparency (two bug fixes by Patrick Valsecchi: SF Tracker/Patches #2305344 and #22543141).
  • PDF manipulation: Call Deflater.end() to free non JVM resources (memory issue reported by Eoin Mallin on the mailing list December 23, 2008).
  • Adding missing @since tags.
  • Different code clean-ups: deprecated warnings, javadoc warnings,...
  • Replacing class casts with the appropriate getAs method (getAsNumber(), getAsString(), getAsArray(),...)
  • Bug fix: ClassCastException in AcroFields.setFields(XfdfReader xfdf)
  • Setting svn keywords properties on new files
  • PdfContentStreamProcessor: Made text matrix private, and exposed via member method; this allows users to sub-class the stream processor from a different package and gain access to it's internal state.
  • PdfContentReaderTool: added ability to specify output filename; added optional command line parameter to specify page number to analyze.
  • CMapAwareDocumentFont: Added special handling if the font specifies 0 width for space character
  • Indirect Objects now keep a reference to the direct object. This is a WeakReference for all PdfIndirectObjects and PRIndirectObjects that are associated with a PdfReader in partial mode. The speed when reading/stamping PDFs is up with 2%.
  • Add support for marked content objects, primarily used to set structure-based tab order in fields.
  • Made it possible to remove getArrayList from the public interface of PdfArray at some point in the future.
  • Bugfix RUPS: corrected the captions of some objects
  • Bugfix PdfWriter.setOutputIntents(): when an ICC destOutputProfile was specified, the resulting PDF was missing a required PdfNumber in the resulting PdfStream, the number of colorants (PdfName.N).
  • PdfWriter.setOutputIntents(): introduction of a more efficient version of this function that takes an ICC_Profile parameter rather than byte[]. The byte[] version must call the ICC_Profile version anyway, so the caller can save themselves some effort.
  • AcroFields: mprove type safety/convenience of AcroFields.Item class.
  • Applied getAs* in AcroFields.
  • Bugfix AcroFields: removeField wasn't updating Item.tabOrder.
  • Bernd Oliver Sünderhauf replaced deprecated calls in PdfAction, PdfCopy, PdfStamperImp, PdfAcroForm, PdfAnnotation, PdfCopyFieldsImp and PdfAnnotationsImp.
  • Possibility to force a font file to be read and kept into memory. See mailing list post by Luke Quinane on February 11, 2009.
  • Code optimalizations (Java coding style, Javadocs, refactoring away duplicate code, spelling errors) in the classes Table, SimpleTable, SimpleCell, PdfPTable, PdfPRow, PdfPCell, ColumnText, PdfName, PngImage, Rectangle, RectangleReadOnly, TextField, PdfObject, PdfDictionary, PdfArray, PdfNull, PdfString, PdfNumber as suggested by Bernd Oliver Sünderhauf in different patches on the SF tracker.
  • TextField: separated the lines obfuscating a password by asterisks (*) out of TextField.getAppearance() to a separate public static function. Made TextField.removeCRLF() public as suggested by Bernd Oliver Sünderhauf (Tracker #2625725)
  • PdfPCell: extra method hasFixedHeight() and hasMinimumHeight() as suggested by Bernd Oliver Sünderhauf (SF Tracker #2634444)
  • Bugfix: the method PdfPTable.getFooterHeight wasn't correct (Fix by Bernd Oliver Sünderhauf; SF Tracker #2628092)
  • Bugfix: PdfPTable.deleteRow() didn't decrement headerRows (and possibly footerRows) if a header or footer row is deleted. (Fix by Bernd Oliver Sünderhauf; SF Tracker #2628145)
  • Support for the /Tabs key in the page dictionary; the /Tabs key is responsible for defining the tab-order of the form fields on a page.
  • Support for JBIG2 Images; code contribution by Nigel Kerr (SF Patch #2464690); adapted by Bruno (for instance: support for JBIG2Globals).
  • Support for HR in HTMLWorker; code contributed by Steve Carrow (SF bug tracker #2579073)
  • Bugfix: The validity checker (Acrobat) expects that DR is a standard Resources dictionary and flags (as a WARNING) any key (for instance /ENCODING) that isn't defined in the PDFRef. It doesn't make it wrong/invalid - but Adobe's syntax checker will flag it. Fix posted on the SF tracker #1851980 by Rodolphe Cardon.
  • Bugfix PdfLine: in some cases, an Image wasn't added to the line. It just disappeared (problem reported by Steve Carrow on the mailing list February 5, 2009).
  • Bugfix PdfStamper: the /P key of an annotation pointed to the wrong page if an annotation was added on another page than page 1 (problem reported on the mailing list February 12, 2009)
  • Bugfix: ColumnText didn't take the image height into account when defining the leading (problem reported by Dario Geier on the mailing list on February 5, 2009).
  • The SimpleXMLParser now ignores ignorable whitespace (as asked by Dominic Maricic)
  • HTMLWorker: support for the value "normal" as "line-height". In this case, the leading is 1.5 (suggestion by Steve Carrow on the mailing list February 4, 2009 and SF Tracker #115255; the actual implementation is different from the patch).
  • Font.setStyle() wasn't a real setter. Now it is. This could break existing code, but so be it. None of the examples depended on the old behavior.
  • Bugfix: a NullPointerException was thrown when you created a javascript action before document.open() and with the JS string longer than 100 characters. Reported by alexmj chan on SourceForge (bug #2563170)
  • XMP: changed pdf:Keywords to pdf:keywords (as defined in the PDF/A specs)
  • Deprecated spacingBefore() and spacingAfter() in favor of getSpacingBefore() and getSpacingAfter(). See suggestion by Andrew Binstock on the mailing list 2008-02-01.
  • SF Tracker / Feature request 2282587: introduction of some typed exceptions that are thrown when reading a PDF file. Instead of just throwing an IOException, you now get a BaddPasswordException, InvalidPdfException or UnsupportedPdfException.
  • Code contribution Holger Plankermann on the mailing list (2009-01-21); inspired by Paulo; code cleaned up by Bruno. Functionality: allows to take an existing PDF without a form and to add a form present in another existing PDF.
  • SF Tracker/Patch #2357539: support for actions in FdfWriter (contributed by Philippe Laflamme)
  • Feature request #2431671: replacing HashMap by Map in the setFieldCache method.
  • Bug report #2393346: In the constructor for XfaForm, the XFA DOM is parsed, and the tree is scanned to find templateNode and datasetsNode; templateSom and datasetsSom are built from those respectively. This processing also had to take place when one calls XfaForm.setDomDocument(Document), but it didn't. Fix contributed by Ken Geis.
  • Markup: Removed duplicate code; also: when getting an RGBColor, null is returned if the name of the color is invalid. (This used to throw an IllegalArgumentException.)
  • PdfCopy: added a method that allows you to add blank pages (asked by Angelo Borsotti on November 11, 2008).
  • ColumnText bugfix: one regular column may not set simple to true if there was at least one irregular column; also you can't just choose any value as TOP for irregular columns.
  • MultiColumnText: extra addText methods to allow you to stay in text mode (as opposed to composite mode) when adding Chunks and Phrases.
  • SpecialSymbol: wrong code for the letter Phi (Reported by Carsten Siedentop)

New in iText 2.1.4 (Dec 20, 2008)

  • Title and Description should be a XmpArray (patch provided by Katja Sondermann)
  • CJKFont: A resource was not closed.
  • PdfCopy/PdfCopyFields: The bookmarks were being written twice.
  • PdfReader: A fix ttake care of broken PDFs that have whitespaces after "stream" before the LF.
  • PdfWriter: Fonts are output in the order they are added.
  • PdfGraphics2D: The patch tsimulate bold broke transparency (Bill Ensley).
  • PDF-A requires an EOL after obj
  • Local gotdoesn't throw exception for inexistent local destination.
  • PdfStamper: Creates the SigFlags is there's a signature.
  • RtfShape: Fix missing RtfDocument objects. Allows for shape objects tbe added correctly.
  • RTF: changed getBytes() tuse DocWriter.getISOBytes(...) for proper byte output.
  • Fix image processing for import. Control word shprslt is for Old version of Word andis not supported at this time. Send data tnull destination.
  • RTF: Preparing for import intelements.
  • Fixed some tags.
  • javadoc cleanup: invalid @throws removed
  • removed unused imports
  • fixed svn keyword substitution
  • classes that already allow us tparse a PDF content stream tretrieve text; could form the foundation of more elaborate PDF parsing.
  • Includes some classes from fontbox.org (BSD license).
  • Bigfix by Mark Storer: rhints not taken intaccount in create method of PdfGraphics2D
  • AcroFields: added a new method setListSelection
  • Exceptions thrown by XmpReader are now caught(see mails Stepan Rybar November 2008 reporting a problem with PDFs generated using FOP)
  • In 2.1.3, I introduced a bug that made the XMP data corrupt andcaused the problem reported by Paul Ryan (on the mailing list, July 28)
  • CFFFontSubset: Ulrich Telle solved a problem when subsetting a CFF font(only blanks were displayed when opening the document with Adobe Reader 8 or higher).
  • TextField: V was only shown when the value wasn't empty AND a value wasn't required.I think it's sufficient tomit V when the field is empty;the extra constraint that the field may not be required is tostrict.
  • PdfPRow: Fixed a problem with setNoWrap(true) in combination with setRotation(180)
  • Implementation of multiselect listbox support in XfdfReaderasked for on the mailing list on October 28, 2008
  • Fixed a Copy/Paste error mentioned on the mailing liston September 1 2008 by Jean-Christophe Dorchies.
  • Bug reported and fixed in the SF bugtracker (#2094155; Carl Freeland):g2.currentFillGState = this.currentFillGState;was missing in PdfGraphics2D.create()
  • Fixed a bug reported in the SF bugtracker (#2124088):Broken autnumbering when using a ChapterAutoNumber as LargeElement.
  • Fixed a bug reported in the SF bugtracker (#2186356):When a paragraph that contains a PDFPTable gets added tanother paragraph,an IndexOutOfBoundsException gets thrown.
  • New method addSignature, based on a suggestion by Michael Klink