Releases: itext/itext-pdfhtml-java
pdfHTML 5.0.2
pdfHTML is an iText Core add-on to create PDF from HTML/XML (and associated CSS).
In this release, we've continued our work on pdfHTML's advanced multicolumn support by supporting the CSS break-inside, break-after, and break-before properties for column-count.
There's a significant improvement in the font selection algorithm for font families with several width classes, as pdfHTML will now consider all font names within a family, and choosing the best matching one.
Another addition to our flex container support is the support for vertical flex-direction pagination. For example, if you want to expand a flex container onto different pages if the content will not fit on a single page.
In other news, pdfHTML will now support SVG tags when using HtmlConverter#convertToElements, and there's a fix for the incorrect vertical alignment of inline-block elements in table cells.
New features
- Column-count: support break-inside, break-after and break-before properties
- Pagination for vertical flex-direction of flex container
Improvements
- Consider all font family fields in font selection
- Support of SVG tag when using HtmlConverter#convertToElements
Bug Fixes
- Incorrect vertical alignment for inline-block elements in table cells
pdfHTML 5.0.1
For the pdfHTML 5.0.1 release we’ve focused on CSS improvements such as support for more flex-related properties. We’ve also introduced multi-column support to allow you to easily layout and render text in multiple columns, just like in newspapers. Currently implemented are column-count, column-height, column-width, column-style, and column-color, with support for more properties coming soon.
New features
- Multi-column support
Improvements
- Improved flex support
pdfHTML 5.0.0
pdfHTML is an iText Core add-on for Java to create PDF from HTML/XML (and associated CSS).
New for pdfHTML 5.0.0 is support for the text-decoration-color CSS property to affect the appearance of nested elements. As noted in the documentation, this property sets the color of text decorations added by the text-decoration-line property. Even though CSS does not provide a direct mechanism to specify a unique color for each line type, by using text-decoration-color you can achieve this effect.
New features
- Support text-decoration-color CSS property to affect the appearance of nested elements
pdfHTML 4.0.5
pdfHTML is an iText 7 add-on for Java and .NET to create PDF from HTML (and associated CSS).
A new feature for pdfHTML 4.0.5 is support for the vertical-align CSS property for inline blocks. This property can be used to align inline-block elements vertically, for more details on its usage you can refer to this example.
In addition, we've made some improvements to flex rendering and performance, and general bug fixes.
New features
- Support vertical-align CSS property for inline-blocks in HTML inline-context
Bug fixes
- The data in the table goes beyond the page boundaries
- Floats: inline-block is not wrapped to new line after 100%-width-float
- Flex layout: exception and slow performance for customer files if flex support is enabled
- The picture is cropped when wrapped in a figure tag
- Fix inline-blocks wrapping when they have relative width set
- Elements with display: inline-block and width: 100% are not wrapped on a new line
- PDF fails to truncate when a DIV element with flex property is nested
pdfHTML 4.0.4
pdfHTML is an iText 7 add-on for Java and .NET to create PDF from HTML (and associated CSS).
The big news for this release is the addition of support for CSS4 device-cmyk colors. Until now pdfHTML only supported CSS RGB colors for direct conversion to PDF, although a workaround was possible by using convertToElements rather than convertToPdf. However, we decided to add initial support for device-cmyk following a request from a customer who wanted to make use of this functionality to optimize their workflow.
Note that this functionality is not available out of the box since device-cmyk is classed as an experimental feature in CSS, and only exists in CSS working drafts. To enable device-cmyk notation you'll need to change the validation rules with the CssDeclarationValidationMaster#setValidator before working with html2pdf. There are currently 2 validators: CssDefaultValidator – the default validator which uses the previous rules of CSS validation and CssDeviceCmykAwareValidator – which, as the name suggests does support this experimental feature.
New features
- Support for device-cmyk
pdfHTML 4.0.3
A couple of very nice updates for pdfHTML this time round. There is a fix for the resolving of the display:none CSS style for flex children, and we’ve fixed an issue with ordered lists where a list symbol could be duplicated when content overflowed onto a second page, causing the symbol to overlap in the converted document.
In addition, the updates to SVG image sizes using exponent notation in Core should also prove useful in HTML conversions.
Bugs
- Fix resolving of display:none css style for flex children
- Fix ordered list symbol duplication
pdfHTML 4.0.2
The release of pdfHTML 4.0.2 brings a couple of nice bugfixes. In previous versions, converting an HTML file which had an @font-face rule with an empty body would result in an NPE. Now, pdfHTML will simply ignore such declarations.
We've also fixed a CSS bug where a checkbox with 100% width and the display: block property would result in incorrect horizontal margins being applied during conversion.
Bugs
- Empty @font-face rule no longer results in NPE
- Fixed the display of checkboxes at 100% width
pdfHTML 4.0.1
The pdfHTML 4.0.1 release is the first release of our HTML to PDF creation add-on in 2022.
It brings better processing of SVG format, thanks to improvements to the SVG module in the iText 7 Core library. SVG support remains a very important focus for us, as we are moving toward comprehensive support of the SVG standard in the iText7 Suite.
In this release, we have also incapsulated all resource handling functionality into the ResourceRetriever class. Now you can be sure that full control of Outbound connections is in your hands.
Improvements
- SVG: Support default value for 'd" attribute
- pdfHTML: web connection is opened outside ResourceRetriever
Bugs
- SVG: Support of q/Q Operators inside BT/ET text block/object
pdfHTML 4.0.0
The pdfHTML 4.0.0 release doesn't bring as many visible changes compared to the previous major release, since we mainly focused on the integration of the new license mechanism and removing deprecated API.
As usual though, some effort has been put into further extending the SVG support. From now, pdfHTML can handle SVG tags in a case-insensitive manner, thanks to the newer version of the jsoup HTML parser.
As for the rest of the changes, expect a few bug fixes and the typical assortment of performance improvements and convenience additions.
New Features
- Allow closing empty layout document without exceptions
- Introduce interface of typography logic and stub implementation at the layout level
Improvements
- Case insensitive SVG tags
- Make PageMarginBoxContextNode implement IElementNode
Bugs
- Infinity loop in ParagraphRenderer
- No list symbol indention for "Right to left" text
- PdfPage: equals is triggered for a nullable object
- HtmlMetaInfo is being used in document#close() event if custom IMetaInfo is passed
- NPE in HtmlDocumentRenderer::getNextRenderer
pdfHTML 3.0.5
The pdfHTML 3.0.5 release is the third quarterly release for 2021.
A new feature in this release of pdfHTML is the support of the attr() CSS function. This is used to retrieve the value of an attribute of the selected element and use it in the stylesheet.
Note: According to the specification, the support for properties other than content is experimental, so pdfHTML only supports this property for now
In other news, this time we mostly focused on handling corner cases and bug fixes in the CSS Flexible Layout Box module support that was introduced in the previous release. However, the addition of support for flex-items with an intrinsic aspect ratio should be noted separately. As it is not clearly defined in the specification when and how an intrinsic aspect ratio should be handled, we did our best to offer as wide support of this property as possible in pdfHTML.
Also, this release contains a quite nice improvement that will be sure to please any perfectionists, as we've improved our Bézier curve approximation for rounded borders! Please see the attached examples to give you an impression of how nice they look now.
Moreover, in this release you can expect a bunch of bugfixes and further performance improvements as usual.
Head on down to the Changelog for more details.
Features
- support attr() function for content property
Improvements
- Bezier curve approximation for rounded borders
- Support of flex-items with an intrinsic aspect ratio
Bugs
- incorrect processing of the width property in the flex algorithm
- float: right in span tag within table causes an incomplete table
- streams remain open when Exception thrown
- incorrect font usage when selecting based on 'font-weight'