Skip to main content
Skip table of contents

Release iText 5.2.1

New release for iText 5.2.1 and XML Worker, continue reading to find out more.


release Notes:

IMPORTANT

All 5.2.x versions have been removed from our servers because of a serious flaw that was introduced when dealing with large PDFs!

I'm preparing to teach an iText class in Paris, and to give some demo's in Oakland. I'm currently making a new set of examples for some new chapters I'm going to write (maybe a third book, not a revision of the second edition, but a book with some advanced topics). Whilst making examples to explain the different options available in XML Worker, I found some bugs and I also thought about some functionality that was missing.


It would be a pity if I demonstrated my new examples in the next few weeks without having a new release with the latest changes, so that's why I made iText 5.2.1 one month after iText 5.2.0 was published. 


Changelog:

iText 5.2.1 Core

  • Changes made by Paulo Soares
    • PdfReader now ignores unreachable pages (this only happens with broken PDFs).
  • Changes made by Jeroen Nouws
    • 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).
  • Changes made by Eugene Markovskyi
    • Fixed the unescapeXML() method so that it skips invalid characters
  • Changes made by Alexander Chingarev
    • 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
  • Changes made by Bruno
    • 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)

XML Worker 1.1.3

  • Changes made by Eugene Markovskyi
    • Cleaning up different spacing issues.
    • Fixing justified alignment.
    • Now XMLWorker uses 1.2 multipliedLeading as default for Paragraph.
    • Cleaning up some minor issues regarding HTML tables.
  • Changes made by Bruno Lowagie
    • ParagraphCssApplier: if the fontSize < 0 (which doesn't make sense), all parameters are calculated using the wrong base.
    • Added a test to avoid a NPE in PathTag.
    • Added a convenience method to add a substitution font to XMLWorkerFontProvider.
    • Replacing String[] with String... in FileRetrieveImpl.
    • Adding a constructor to FileRetrieveImpl with a File object defining a root directory as parameter.
    • Adding a setFileRetrieve() method to the CSSResolver interface.
    • XMLWorkerFontProvider: With DONOTLOOKFORFONTS, you can avoid that the FontProvider spends time on registering font directories (you may not need them).
    • XMLWorkerHelper: If a charset is defined, you want to use it when parsing XML.
    • Added a convenience class that can be used to parse XML to a list of elements: ElementList
    • XMLParser: detecting the encoding didn't work in some environments because the mark was invalid (and a call to reset() failed). Now we expect a '>' in the first 1028 characters.
    • Added setChunkCssAplier() method to the CssAppliers interface
JavaScript errors detected

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

If this problem persists, please contact our support.