iText Changelog

What's new in iText 5.5.6

May 14, 2015
  • iText 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.
  • Replaced PdfCleanUpGraphicsState with existing GraphicsState from itext.pdf.parser package, added missing parameters into the latter
  • 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)
  • 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.
  • (DEV-1377) Fixed PdfPTable.setKeepTogether() when using a tagged writer
  • BaseFont: avoid synchronization of fontCache and using ConcurrentHashMap instead.
  • Fixed bug (wrong PDF operator was written into content stream instead of fill color operator).
  • first version of contribution guidelines
  • CONTRIBUTING.md describes how users can send pull requests to iText.
  • 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)
  • Removed deprecated logic of saving and restoring color for tagged pdf documents in PdfContentByte class (DEV-1371).

New in iText 5.5.5 (May 14, 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
  • XML Worker. Fixed some div width calculation issues.
  • XML Worker. Support for Div text-align.
  • XML Worker. Arabic content was loosing html styles after converting from HTML to PDF
  • 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.
  • 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.
  • 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.
  • Fonts. Updated the documentation to reflect the experimental status of support for Devanagari.
  • 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.
  • Fix. PDF/A-1: fix outputintent RGB check.
  • Fonts. Acces table GSUB is directly by a RandomAccessFileOrArray.
  • Fonts. GSUB Lookup type 1 Format 2.

New in iText 5.5.4 (May 14, 2015)

  • 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() logic

New in iText 5.5.3 (May 14, 2015)

  • 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.2 (May 14, 2015)

  • Improved generic testing framework (GenericTest, WrapToTest,...).
  • Added a method to PdfContentByte that allows you to add a Form XObject using a stream, a name and the coordinates of the CTM.
  • PdfName.ON was changed from "ON" to "on" by mistake in one of the previous release. This has now been fixed.
  • Officially deprecated PdfCopyFields
  • Officially deprecated HTMLWorker
  • Added PdfACopy class for coping PDF/A documents
  • PdfWriter: add cacheObject() method
  • PdfCopy, PdfAWriter, PdfAStamperImp: improve cache logic, overriding PdfWriter's cacheObject() method.
  • Improved generic testing framework (GenericTest, CompareTool,...).
  • Prevent the use of PageStamp when using PdfCopy in tagged mode.
  • Added support of FDF setJavaScriptAction().
  • WebColors: change transparent color to (0xff, 0xff, 0xff, 0x00)
  • Fixed a bug that caused a StackOverflowException when copying forms. The fix was suggested by Michael Klink on StackOverflow.
  • Moved method PdfCopyForms.copyDocumentFields() to PdfCopy
  • Fixed a potential NPE in PdfBody.Add()
  • Fixed incorrect processing of the Standard Type 1 Symbol and ZapfDingbats fonts (glyph mapping / encoding issue).
  • Restoring Tab functionality where a tab switched to the next line when the previous content risks to overlap with the new content. Solved some problems in case a tabs "overflows".
  • PdfCopyFields and PdfCopy: now we also create the Tag structure when merging fields (this wasn't supported in the past).
  • Added translations for error messages.
  • Improved PdfAWriter.addFileAttachment() by adding a new method with an extra parameter
  • Implemented a suggestion by Bennie Lohr to move a super.close() call in PdfWriter to a finally clause so that the method is called even if an exception occurs.
  • Unchecked parameter input in WebColors caused NoSuchElementException
  • Overall improvement of the testing environment
  • GifImage: added an extra close() so that an InputStream is closed. This bug was reported by Manfred Neundlinger on StackOverflow.
  • Added an entry to PdfName for Associated Files (AF).
  • In case of a Type3 font, we now just show the characters as is (before we showed nothing). Note that this change doesn't always make sense: Type 3 fonts are user defined fonts where arbitrary characters are mapped to custom glyphs. For instance: the character a could be mapped to an image of a dog, the character b to an image of a cat. When parsing a document that shows a cat and a dog, you shouldn't expect seeing a cat and a dog. Instead you'll get b and a. That doesn't make sense in this context, but at least you get two different characters.

New in iText 5.5.1 (May 14, 2015)

  • 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.5.0 (May 14, 2015)

  • Fixed some accessibility issues:
  • Adding the PDF/UA identifier to the XMP metadata.
  • The background rectangle of a Chunk is now marked as an artifact.
  • Attributes for Form XObjects (PdfTemplate) are now being written.
  • Introduction of Layout for ownership.
  • Don't generated nested tags in Tagged PDF page content (to make sure the Read Out Loud functionality works as expected)
  • Support for BBox attribute of structure element
  • Support for "O" attribute for structure element
  • TrueType symbolic fonts should not be decoded when extracting text from PDF and encoded when writing text to PDF.
  • Bugfix PdfCopy: not checking if a page reference is null, ruined tags when concatenating tagged PDFs (reported on StackOverflow; fix suggested by Michael Klink).
  • Fixed issue with wrong appearance streams when merging documents containing same AcroField names.
  • Fixed merging issues when using PdfCopy in full compression mode.
  • Moved the CompareTool class to a separate testutils package and introduced a generic superclass for tests.
  • Updated the CompareTool functionality, adding methods to compare structure and content of Tagged PDFs, document info, links,...
  • Extended the toString() method of the PdfAnnotation class.
  • Fix for bug with checkEmbedded file in PdfA3Checker
  • Fix for issue with Pdf/A cached objects in PdfAStamper reported on StackOverflow
  • PdfDocument: allowing character and word spacing in a broader context.
  • Fixed some accessibility compliance issues, adding an isInline() method to the IAccessibleElement interface.
  • Introduced a new PdfReader constructor with a new interface ExternalDecryptionProcess, allowing to use BC's Recipient and RecipiendId (based on suggestions by Valentin Ts. Ivanov and David Hook).
  • Fixed bbox in image tag attributes.
  • Fixed a problem with PdfCopy and forms: enable NeedAppearances in the output when one of the input documents has it enabled.
  • Fixed a problem with the getTiffImage() method in the Image class.
  • Fixed a problem with keywords in XMP metadata: Dublin Core subject should be used for "keywords"
  • Fixed comma and semi-colon handling in XMP keywords
  • Improved producer line functionality
  • Improved the OSGi headers
  • Added method to set raw data stream as-is
  • CMapAwareDocumentFont: if font space width isn't defined, use the default width for the font.
  • PdfContentReader: avoid exception when displaying an empty dictionary.
  • Reworked old Info Dictionary code to avoid a ClassCastException in PdfStamperImp.
  • Added custom split character functionality to DefaultSplitCharacter.
  • Images (more specifically TIFFs): Renamed handleIncorrectImage to recoverFromImageError and changed the flow to a more logical flow according to its name.
  • Added a workaround for parsing certain TIFFs with compression 3. The workaround is applied using the recoverFromError Boolean.
  • Image class: Removed useless pageNumber variable (and calculations performed to create it)
  • Image class: Removed use of deprecated RandomAccessFileOrArray constructor.
  • Updated javadocs for onStartPage() method in PdfPageEvent: it now mentions previously undocumented, but expected behavior for the first page.
  • Added a value for the PieceInfo key to PdfName
  • Added PdfName.PIECEINFO
  • Add document.isOpen() check to PdfCopy.addDocument()
  • CompareTool: Updated an exception message that wasn't very clear.
  • Bugfix Point class: Using the wrong variables in the translate() method (reported by Michael Klink).

New in iText 5.4.5 (May 14, 2015)

  • Fixed issue with removing null objects when using PdfCopy/PdfSmartCopy.
  • Bugfix: when producing a PDF 1.4 document in tagged mode (PdfWriter.setTagged()), adding a table gave the exception: com.itextpdf.text.DocumentException: Unknown structure element role: /TBody.
  • Fixed problem when creating Chapter objects with no text.
  • XAdES-EPES support.
  • Fixed Paragraph.cloneShallow() method (keepTogether field).
  • Moved multipleLeading field from Paragraph/NoNewLineParagraph to Phrase.
  • Improve merge fields logic for tagged documents.
  • Improve PdfCopy for PdfNull objects in tagged mode.
  • Fixed document leading calculation.
  • Add LineSeparator constructor from Font.
  • Fix behavior of underline style for Chunk.NEWLINE.
  • PDF/A-3 support
  • Added PdfA2Checker.checkAnnotation().
  • Added getDirectDictionary() method for PdfAChecker.
  • Added PdfArray caching in PdfAChecker.
  • Added PDF/A specific addFileAttachment()/addPdfAttachment() methods to PdfAWriter.
  • Added ModDate key to the PdfFileSpecification dictionary.
  • Add possible AFRelationship values to PdfName.
  • PDF/A-2 checks:
  • Extended graphics state
  • Bugfix: actual div element height wasn't computed correctly when the div element places partially on the page.
  • Reuse PFA1Checker logic in cases where PDFA-2 restrictions are conformant with PDFA-1
  • Fixed NullPointerException caused by the addDocument() method in PdfCopy.
  • PDF/A-2 checks:
  • Check File trailer, stream filters and implementation limits
  • Actions
  • XFA forms
  • Use of alternate presentations and transitions
  • Document requirements
  • Document permissions
  • Embedded files
  • Output intent
  • Color spaces
  • Transparency
  • Fonts
  • Added MultiFilteredRenderListener class for PDF parser.
  • Added GlyphRenderListener and GlyphTextRenderListener classes for processing each glyph rather than processing chunks of text.
  • Added method getMcid() in TextRenderInfo.
  • Fixed some error messages.
  • Use logger to print exceptions for PdfReader debugmode.
  • Fixes and translations for the error messages.
  • Bug fix: resource leak when many inline images were in content stream
  • Bug fix: non memory map related IOExceptions were being silently swallowed in MappedChannelRandomAccessSource
  • Bug fix: closing resources properly when exceptions happen
  • Fixed a bug in writeSelectedRows() involving colspan.
  • Code contibution by Kwinten Pisman: Build_Props and App dictionary that allow you to add information about the application that signed the PDF to the signature dictionary.
  • The ISO specification on file identifiers says: "The first byte string shall be a permanent identifier based on the contents of the file at the time it was originally created and shall not change when the file is incrementally updated. The second byte string shall be a changing identifier based on the file's contents at the time it was last updated. When a file is first written, both identifiers shall be set to the same value." With this change, we make sure that the two identifiers have the same value when the file is created from scratch.
  • It doesn't make sense to set full compression after the document has been opened. This fixes a problem introduced by a change the ensured better handling of generation numbers.
  • Avoiding a NullPointerException in PdfXConformanceImp.

New in iText 5.4.4 (Sep 18, 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.4.0 (Feb 14, 2013)

  • Make EOF consistent in class RandomAccessFileOrArray.
  • Fix PdfStamper: avoid double closing; update Javadoc.
  • Fix PdfReader: fixed confusing error message that reported the wrong value.
  • Fix CMapAwareDocumentFont: Apply the font mapping first before overriding it with the ToUnicode.
  • GlyphList: added support for char names of the format uniXXXX (with XXXX a hexadecimal value).
  • Started working on Indic support based on code contributions by Palash Ray.
  • This functionality has been disabled for this release, because it needs much more work.
  • Refactoring IO: add optional exclusive lock capability
  • Added tagged DIV element support
  • Fixed "incorrect reading order" problem on some PDF documents
  • A fix for a multithreading issue introduced in 5.3.5 that occurred when embedding ttf fonts.
  • Bugfix in PdfSmartCopy: circular references in PDFs (constructions where object A refers to object B and object B refers back to object A) could cause endless loops resulting in an OutOfMemoryException.
  • Adding tag attributes for PdfDiv, PdfPTable and lists
  • Fixed margin mirroring functionality.
  • Fixed problems when copying/concatenating Tagged PDFs.
  • Improved file size by removing unused objects after copying Tagged PDFs.
  • Improved tags structure in case the order of documents and pages are mixed.
  • Create nums tree for incorrect tagged document.
  • Fixed a bug with PdfStructureTreeRoot.buildTree() for PdfWriter
  • Throw an exception when trying to merge Tagged PDFs with an invalid structure
  • Empty line processing in BidiLine: the remaining width of an empty line should be equal to original width of its container (be it ColumnText or PdfDocument).
  • Fix layout problems when using consecutive spaces.
  • Changes made by Raf Hens
  • MappedRandomAccessFile: fixed IndexOutOfBoundsException
  • PdfReader: The method eliminateSharedStreams() now has to be called explicitly if you intend to change something to one specific stream.
  • Avoiding a NullPointerException when using an ExternalBlankSignatureContainer
  • The isRevocationValid() method shouldn't assume SHA-1 as digest algorithm.
  • Fix when parsing PDFs because the same glyph name can correspond with more than one character value.
  • Fix: a Chunk shouldn't have the "power" to change the properties of an Image object. If the Image is also used in a different context, you risk unwanted side-effects (getting the image in a different size than you expected).
  • If an OCSP response doesn't define a 'next update', we use the date of the OSCP response + 3 minutes.
  • Applied suggestion by W Trevor King to add support for UTF-8 to FdfReader.
  • EncryptionAlgorithms: Added missing OID for RSA.
  • PdfContentByte: introduction of an isTagged() function that checks if the writer object isn't null before invoking writer.isTagged().
  • AcroFields: changing the font with setFieldProperty() didn't work if no resources dictionary (/DR) was available.
  • AcroFields: the boolean generateAppearances is true by default, which means we need to remove the /NeedAppearances entry. It will be reintroduced if somebody triggers setGenerateAppearances(false); Note that the presence of /NeedAppearances with value true causes recent versions of Adobe Reader to ask the end user if he wants to save the form, even if he didn't change anything.
  • AcroFields bugfix: In case a prefilled form was flattened, the prefilled text fields were disappearing because they weren't regenerated.
  • LtvVerification: Added a method that gets the issuing certificate of a certificate from a list of available certificates. This method is used when getting an OCSP response for a certificate (which requires the parent certificate).
  • BouncyCastle upgrade: we're now using BouncyCastle 1.48 instead of BouncyCaslte 1.47.

New in iText 5.3.5 (Dec 19, 2012)

  • Support for simulating bold in vertical text.
  • Support for signing with an external container and added a blank signature container to help with deferred signing.
  • Simplification with streams reading the part of the document that should be hashed.
  • Signature verification for docs over 2G.
  • Rich text field always failed check (replace an 'or' for an 'and').
  • Fixed a problem with some TIFF files: reduce the count of images if there's an EOF.
  • Added support for AES-256 certificate encryption
  • Fixed bug in PRTokeniser: handle case where number is at end of stream.
  • Huge refactoring of RandomAccessFileOrArray functionality.
  • Several fixes during the tests of the refactored code.
  • Replaced StringBuffer with StringBuilder in PRTokeniser for performance reasons.
  • Fixed crash on parsing named destination
  • Improved the performance of the PdfDestination constructor
  • Tagged PDF related changes (BETA-version):
  • Changed the way iText adds content to a separate layer for text and graphics. In case the natural reading order needs to be preserved, one can now add everything to one layer.
  • Added alternate text support for images.
  • Make sure marked content operators are balanced.
  • Added support for custom roles for marked content; don't add marked content block if role = null.
  • Added a language property.
  • Refactored PdfStructTreeController so that id does not rely on PdfReader.getSafeFile()
  • Added support for tagged lists
  • Added support for tagged tables, including THEAD, TFOOT, TBODY.
  • Added support for tagged chapters and sections.
  • Added support for tagged links
  • Fixing different issues after first tests Tagged PDF: incorrect color issue on drawing underlines and backgrounds in tagged PDF mode, issue with extra page that appears if you call Document.newPage() for the empty document, potential issue with identifying empty page in non-tagged pdf mode, newline chunk should have paragraph role in Tagged PDF context,...
  • Added DisplayDocTitle and Xml Metadata (XMP) to Tagged PDF documents. This is required to pass the PDF/UA verification.
  • Applied fix for tab space (functionality that is used in XFA Worker).
  • Fixed bug introduced in iText 5.3.4 that caused PdfConcatenate always to use PdfCopy even when PdfSmartCopy needed to be used.
  • Added tagged attributes for Chunk and Image.
  • Fixed a bug introduced in iText 5.3.4: after adding a table to the page, its total height was always zero
  • Fixed a bug in FloatLayout that caused an IndexOutOfBoundsException.
  • Fixed different XML Worker related problems caused by nesting div and table tags.
  • PdfGraphics2D: transparency was not set correctly in some cases when combining setClip() and create()
  • Important: we now keep the original owner password when stamping a document.
  • Added a Ligaturizer for Devanagari and Gujarati originally contributed by Ram Narayan; refactored by Bruno. Moved ArabicLigaturizer and introduced a LanguageProcessor interface. This needs some more work: what's the best way to integrate this into iText?
  • Fixed a positioning problem for Chunks with an action attribute
  • Fixed a bug reported by Andreas Meyer on the mailing list (Dec 6, 2012). When retrieving rectangle information, the coordinates were accidentally switched.
  • Avoid NullPointerException in CFFFontSubset (reported by Yu Gan and Martin Sievers)
  • Avoid NullPointerException in OCSPVerifier
  • Made small change in PdfPKCS7 to make code more readible.
  • LtvVerification: all certificates need to be verified (the order doesn't matter)

New in iText 5.3.4 (Nov 6, 2012)

  • The signature date when invoking getSignDate() will now be the timestamp date (if available).
  • Appended xref streams could hide new objects, resulting in errors parsing an existing PDF. When trying to retrieve an existing object, iText returned null instead of the object.
  • Added low-level filtering hook to LocationTextExtractionStrategy.
  • Bugfix in OCSPVerifier (a typo was causing false negatives)
  • Preparing better support for creating tagged PDF using high-level objects (work in progress; DO NOT USE UNTIL FINISHED)
  • Concatenation of tagged PDFs: PdfCopy now also concatenates the structured tree (using a new class named PdfStructTreeController).
  • Introduced the concept of TABSPACE in the Chunk class.
  • Preparing better support for creating tagged PDF using high-level objects (work in progress; DO NOT USE UNTIL FINISHED); added IPdfStructureElement.
  • Avoiding NullPointerException in ColumnText.
  • Fixing NoSuchElementException in ColumnText.
  • Added extra methods to PdfAStamper to allow people to sign PDF/A files.
  • Added support for 8 bit images that are compressed using TIFF predictor 2.
  • Added a getRotation() method to PdfImportedPage so that you can ask the page if it's rotated or not.
  • Fixed a header problem adding a table which spans multiple pages using table.setComplete(false);
  • Digital signatures:
  • CrlClientOnline cached CRL URLs. There are situations where you don't want that.
  • LtvVerification: added logging information, and introduced a class VerificationException
  • Wrote a class named LtvVerifier along with classes to verify Certificates against a keystore, CRLs, and OCSP responses: CertificateVerifier is the superclass of RootStoreVerifier, OCSPVerifier and CRLVerifier. These classes can be used to create a list of VerificationOK objects.
  • CertificateVerification: extra method that doesn't check any CRLs.

New in iText 5.3.3 (Sep 27, 2012)

  • Fix: The PdfReader copy constructor didn't work correctly if the original PDF had compressed object streams.
  • Fix: The predictor should also be applied to the deflate compression when reading TIFF files.
  • Implemented verification of CAdES signatures.
  • Parsing PDF: incorporate the text-rise parameter
  • Parsing PDF: expose glyph-by-glyph information
  • Bugfix: text to user space transformation was being applied multiple times for sub-textrenderinfo objects
  • Bugfix: Correct baseline calculation so it doesn't include final character spacing
  • PDF/A bugfix: no Exception is thrown for a non-embedded font.
  • Bugfix: JPEG resolution was sometimes negative due to uncareful bit manipulation (sign extension)
  • Added convenience methods for the new PdfPTable functionality that allows you to define table breaks.
  • Report by Robert Simpson: he found a corrupt PDF with a reference to a negative object: -1 0 R, and suggested a fix so that PdfReader can deal with this syntax error.
  • Deprecated the setAcro6Layers() method.
  • Removed the MultiColumnText class, use ColumnText instead!
  • PdfPTable: added functionality that prevents a table break after a specific row.
  • PdfPTable bugfix: if the table ends with rows with zero height at the bottom of the page, skip those rows.
  • PdfPTable bugfix: Avoid repeating content; content can be consumed when using rotation 90 or 270.
  • Moved the convertToHex() method from LtvVerification to Utilities
  • Added extra logging to different signing methods (showing CRL, OCSP, TSA information in the log files)
  • Added what is needed for ECDSA support, but I don't know if it works because I don't know any PDF Viewer that already supports ECDSA.
  • Bugfix: A FieldMDP can coexist with a DocMDP in a signature.
  • Bugfix: If there's a lock on the fields, always add a FieldMDP entry to the signature.
  • Added a toString() method to the FieldLock class.
  • PdfPKCS7: Added two getter methods: one to get the Encryption algorithm, one to get the filter subtype.
  • CrlClientOnline: Avoid loading the same CRL more than once; switching to a more uniform way to add URLs to the list of CRLs.
  • Verification failed in case LTV timestamp was added (because of Key Usage and Extended Key Usage)
  • Changing the Exception thrown by LtvTimestamp
  • OcspClientBouncyCastle: split up a single method into three different methods to make it easier to get an OCSP response.
  • Added SignaturePermissions: Convenience class to find out more about a signature and the permissions defined for that signature.

New in iText 5.3.2 (Aug 22, 2012)

  • Digital Signatures
  • Introduced the ExternalDigest interface, so that you can separate the hashing from the signing (done with ExternalSignature). This means that it's possible to have different providers for signing and hashing.
  • Created two implementations of ExternalDigest: ProviderDigest and BouncyCastleDigest Use BouncyCastleDigest by default for digests (in general) and get its digest algorithms straight from Bouncy Castle.
  • Fix: the signature fields in a form should come in the order of the revision.
  • Changes made by Eugene Markovskyi
  • Fix: When a div is in a table, XML Worker 1.1.5 (using iText 5.3.1) fails. 1.1.4 with 5.3.0 does produce output.
  • Refactored PdfWriter.addSharedObjectsToBody() and PdfStamperImp.close() for reasons of convenience.
  • Hyphenation wasn't friendly towards unknown characters.
  • Fixed a NullPointerException in PdfAWriter
  • Tiff colormaps are 16 bit but some tiff producers just put 8 bit resulting in black images. For these broken tiffs we try again using only 8 bits.
  • Changes made by Michaël Demey
  • Added color functionality to ZapfDingbatsList by introducing a setter and a new constructor.
  • Removing unnecessary imports
  • Fix in PdfAnnotationsImp: You can't always assume that the PdfArray returned by get(PdfName.RECT) is of type PdfRectangle. It could just be a PdfArray object.
  • Creating page events for PdfCopy or PdfSmartCopy doesn't make sense, so let's throw an exception when somebody tries to do so.
  • Avoiding a NullPointerException for graphical signature appearances that didn't get a graphical element.
  • Introduced a PdfSigLockDictionary to lock specific fields; add a FieldMDP to the signature to lock those fields.
  • Changed the order of the parameters in the signDetached() method of the MakeSignature class, because hashing is done before signing (and the API has changed anyway).
  • Added reusable methods to DigestAlgorithms that create a MessageDigest instance or create the digest. Replaced instances of MessageDigest.getInstance() in the security package with the new convenience method from DigestAlgorithms.
  • When using SunMSCAPI, also create the hash using the default MessageDigest of the JDK.
  • When using the default MessageDigest, normalize the name of the digest algorithm. For instance change SHA256 to SHA-256.
  • Introduced an enum to pass the Signature Standard to the signDetached() method of the MakeSignature class.
  • Added extra logging to the signing process: finding CRLs, using CRLs, Time stamping.
  • Renamed CrlClientImp to CrlClientOnline and added constructors that take an URL or a certificate chain (from which URLs will be extracted).
  • Do a better effort to find the CRL when using the default CrlClientOnline
  • Changed the default digest algorithm in TSAClientBouncyCastle from SHA-1 to SHA-256
  • Introduced a TSAInfoBouncyCastle interface that allows you to get more info right after receiving the timestamp from the TSA.

New in iText 5.3.1 (Aug 1, 2012)

  • Improved the calculation of the leading in ColumnText
  • Fixed pagination for PdfDiv class
  • Changed some access modifiers from private to protected
  • Splitted the PDF/A functionality so that it can be put in a different jar
  • Fixed a bug in PdfDocument: don't trim leading space when splitting on newline
  • Class BmpImage: Support for 52 and 56 byte BMP headers
  • Class ICC_Profile: Ignore invalid ICC profile (wrong number of color components) especially in Jpegs
  • Removed some unnecessary imports
  • Bugfix: XmpWriter shouldn't assume that all info dictionary keys have a String value
  • The new PdfDiv element should also be allowed in Phrase and ColumnText
  • Separated the release info from Document into a separate class named Version
  • Bug report #3548434: if nothing is added to a Section, addAll() should return false
  • Bug report #3547811: fixed ClassCastException, and at the same time replaced if-construction by a switch in Phrase.add(index, element)
  • Bug report #3547812: Anchor assumes that it consists of Chunk objects only. This is not necessarily true
  • Introduction of a LINEHEIGHT attribute in class Chunk
  • Updated the link to the article about ExceptionConverter by Heinz Kabutz
  • PdfSignatureAppearance: Fixed a problem with disappearing image if the height of the signature < 19 pt

New in iText 5.2.1 (Apr 2, 2012)

  • PdfReader now ignores unreachable pages (this only happens with broken PDFs).
  • PdfPublicSecurityHandler: added a check for InvalidKeyException when initializing cipher, if catched cipher will be initialized with the public key instead of the certificate (suggestion by Régis Ramillien).
  • Fixed the unescapeXML() method so that it skips invalid characters
  • PdfNameTree: fixed crash on iterating through names tree when tree is splitted into several arrays (reported by Jason Rock who suggested a fix).
  • Added more convenient SimpleBookmark methods (e.g. to get child bookmarks of a certain outline object).
  • PdfName: added some new names
  • Bugfix AcroForms: In some cases, Adobe Reader X asks if you want to "save changes" after closing a flattened PDF form. This was due to the presence of some unnecessary entries in the /AcroForm dictionary (for instance added when the form was created with OOo).
  • XfaForm: Added a readOnly parameter to the fillXfaForm() method.
  • Extra ColumnText method to check if an Element is allowed in a column.
  • Paragraph: added a cloneShallow() method and a method that breaks up a Paragraph into a list of paragraphs, lists and tables.
  • ColumnText now breaks up a Paragraph before adding it to the stack. This prevents flattening of the content nested inside the paragraph (deep nesting still isn't supported).
  • Nested Paragraph objects can now have different values for the leading.
  • Files loaded from deep nested jars or ears in jBoss are referred to with vfszip: (Bug report #3512734)

New in iText 5.2.0 (Mar 1, 2012)

  • iText 5.2.0: better PDF parsing
  • We received plenty of feedback regarding PDF parsing, and we've taken into account almost all the issues that were reported. This means that PDF to text conversion with iText has now improved dramatically. Soon the Belgian IRS will start using iText to parse thousands of documents looking for a national number on the first page. We're using different strategies to do this: we parse the text at a specific position if we know it; or we parse the whole page looking for a pattern if the number can be anywhere on the page. We've also improved the parsing of PDF documents in languages such as Chinese, Korean, Japanese

New in iText 5.1.3 (Dec 1, 2011)

  • iText 5.1.3 brings the long awaited support for PAdES-LTV. Examples on how to use this functionality that will be part of the upcoming PDF-2 standard will be following soon. We've also improved the code for parsing PDFs for images. It can now be done using much less code than before. We've added support for JavaScript when parsing bookmarks to XML (or vice-versa) and some convenience methods to ColumnText.
  • Furthermore, we've fixed plenty of bugs that were reported since the previous release, for instance a bug that garbled the output when parsing PDFs with fonts using a /ToUnicodeMap, an issue with page numbers that were shown even when the page label should have been empty, and so on.
  • Finally, we've made iText more tolerant towards PDFs that weren't created correctly. For instance a PDF with a binary zero in the Producer name, or PDFs where the /Outlines dictionary isn't an indirect reference.

New in iText 5.1.1 (Aug 16, 2011)

  • Added high level api interfaces Indentable and Spaceable. This makes it easier to apply styles in XML Worker.
  • Extended Logging to work like logging frameworks do.
  • Added a simple System.out logger: SysoLogger
  • Added a WriterOperation interface, and an abstract WritableDirectElement class that should implement it. This object allows XML Worker to do operations on a writer/document, similar to what VerticalPositionMark does, but different.
  • An incomplete ToUnicode cmap would prevent the correct text extraction.
  • Fixed problem where an Exception was thrown in the edge condition where renderInfo.getText() returns an empty string.
  • Bugfix Rectangle: the parameters defining the lower-left coordinate weren't taken into account
  • Restore of some changed XMLs. Fix by Jérôme Marant for Latin (see version 2.1 of the extrajars).
  • Normally, a PDF should have the startxref value in the final 1024 bytes. However, some PDF producers create really bad PDFs with plenty of gibberish after the %%EOF marker. With these extra tests, iText will now continue the search for startxref if it can't be found in the final 1024 bytes.
  • Bugfix: List symbol attributes were ignored. Bug reported by Emiel Ackermann.
  • Changed HashMap into Map in the setMoreInfo() method (and related variables/methods).
  • Changed the place where the Info dictionary is updated. This should make the XMP stream consistent with the updated Info dictionary.
  • Bugfix in PdfLayer and PdfWriter: The /Usage of an OCG layer doesn't have to be a direct object; it can also be an indirect reference.
  • Bugfix in PdfWriter: The /D and /AS in the context of OCG don't have to be direct objects; it can also be indirect references.
  • PdfPCell: the default for using the ascender/descender is set to true.
  • Added PdfConcatenate: a class with the same functionality as PdfCopy/PdfSmartCopy, but in a more user-friendly way.
  • When calculating the leading of a line, the image height only has to be taken into account if the changeLeading variable is set for Image chunks.

New in iText 5.0.6 (Feb 5, 2011)

  • Added an event to signal that a table will continue in the next page
  • 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.
  • 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.
  • PDF parser: handle slightly malformed embedded images
  • 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
  • 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
  • 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 5.0.4 (Aug 23, 2010)

  • PdfContentStreamProcessor: removed unused code
  • PdfPRow: lowered the fuzzy factor to compensate for floating point errors
  • Replaced HashMap for Map in the return of AcroFields.getFields().
  • Parsing PDFs:
  • Code cleanup
  • Content streams in arrays should be parsed as if they were separated by whitespace
  • Expose CTM
  • Parsing PDFs: Inline images:
  • Refactor to pull inline image processing into it's own class. Added parsing of image data if there is no filter applied (there are some PDFs where there is no white space between the end of the image data and the EI operator). Ultimately, it will be best to actually parse the image data, but this will require a pretty big refactoring of the iText decoders (to work from streams instead of byte[] of known lengths).
  • Handle multi-stage filters; Correct bug that pulled whitespace as first byte of inline image stream.
  • Applying stream filters to inline images.
  • PdfReader: Expose filter decoder for arbitrary byte arrays (instead of only streams)
  • Bugfix PdfPTable: A previous bugfix caused a new bug: instead of too many lines, there were lines missing.
  • Bugfix PdfCopy: pages imported using PdfCopy.PageStamp weren't copied to the resulting PDF file
  • PdfWriter.getNewObjectNumber(): Avoiding a NullPointedException as suggested by Gylfi Ingvason on the mailing list.

New in iText 2.1.7 (Jul 23, 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.
  • Changes made by Kevin Day
  • 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 to cid mapping so it takes the first one found from DocumentFont.
  • This is just a band-aid, as it doesn't address cases where multiple cids may map to single unicode value.
  • Fix byte to int sign conversion
  • Enhance text parsing to handle fonts with encoding but no ToUnicode map. Ref Bug #2792227
  • Changes made by Bruno Lowagie
  • PdfPRow: Cheating a little bit more to deal 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 into account the top border width of the Image in case the leading has to be changed to accommodate for the image height.
  • RtfList: The public void writeContent(final OutputStream result) method needs to output
  • RtfParagraph.PARAGRAPH_DEFAULTS after every list.
  • Patch posted anonymously to SF (#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)