Skip to content

Releases: itext/itext-pdfhtml-dotnet

pdfHTML 6.2.0

15 May 11:10
6.2.0
Compare
Choose a tag to compare

pdfHTML is an iText Core add-on for creating PDF from HTML/XML (and associated CSS).

This release introduces a new high-level API to make the generation of PDF/UA documents simpler and more intuitive, and some more CSS/SVG improvements.

More Convenient PDF/UA Creation

Our main goal with this latest release of pdfHTML was in improving the conversion from HTML into documents which conform to the PDF/UA standards for universal accessibility. As mentioned in an article over on itextpdf.com, the improvements in iText Core and pdfHTML’s APIs make creating archivable PDF/A documents from HTML much easier than with iText 5. In a similar way, we’ve now fine-tuned pdfHTML’s API to allow for smooth HTML conversion into both PDF/UA-1 and PDF/UA-2 compliant documents in just a single step.

To make things easy, the ConverterProperties Object comes with a handy toggle for PDF/UA support. Just choose the version of the PDF/UA standard you want to focus on, and you can count on iText Core and pdfHTML to handle all the intricate details smoothly for you.

CSS and SVG Improvements

Following on from the CSS additions in the previous iText release, we’ve now added support for the align-content property to pdfHTML’s existing Flexbox support. Supported values are normal, content-distribution and content-position, and you can expect further support for advanced flex properties coming down the line.

Another important change for this release is in the conversion of <svg> tags for PDF/UA. When targeting conformance with the PDF/UA standard, it requires an alternative description to be set. While SVG does not support <alt> tags as such, it does have the corresponding <desc> element to provide accessible, long-text descriptions of SVG containers or graphics elements. Now, pdfHTML will handle this translation for you automatically.

Miscellaneous and Bug Fixes

There is a change in the handling of alternative descriptions for form fields in the case of PDF/UA-2 documents. This aims to ensure alternative descriptions are applied properly when accessibility properties are set.

The copyright headers for all jsoup-related files have been modified to note that 1) they reflect the proper attribution, and 2) may contain modifications not present in the original project.

We’ve resolved a NullPointerException which could result from processing HTML and using relayout(). This was reported by a customer who encountered the issue when laying out a bulleted list where the list’s children did not have a parent during the execution of the parent#drawChildren method. To fix this, we’ve enhanced the applyListSymbolPosition method to ensure proper handling of list symbols and prevent NPEs. In addition, an injectSymbolRendererIntoParagraphRenderer helper method has been introduced, and the logic for rendering list symbols was refactored.

Finally, a couple of CSS bugs have been fixed. The first occurred when parsing multiple CSS selectors which were separated in an unconventional way, and so we added new parsing logic to account for this.

The second issue was in the calculation of the height for inline elements in fixed-size containers. To fix this, we’ve modified the layout module to add the AnonymousBox class to represent anonymous layout boxes, and AnonymousBoxRenderer to handle rendering of layout boxes with custom behaviors for margins and height resolution.

New Features

  • New high-level HTML to PDF/UA API
  • Support for the CSS align-content property in Flexbox

Improvements

  • SVG tags should take into account alternate description when tagged as figure
  • Change how alternative descriptions are applied for widget annotation in PDF/UA-2
  • Added copyright attribution clarification for jsoup-related files

Bug Fixes

  • Percent height for inline element not resolved correctly in fixed size containers
  • CSS selector with two elements failed
  • NullPointerException processing HTML and using relayout()

pdfHTML 6.1.0

14 Feb 13:09
6.1.0
Compare
Choose a tag to compare

pdfHTML is an iText Core add-on for creating PDF from HTML/XML (and associated CSS).

This release focuses on extending the existing support for GraalVM Native Image to pdfHTML, and major improvements to CSS. In addition, pdfHTML takes advantage of Core enhancements such as table performance, SVG, font handling, layout and PDF/UA.

GraalVM Native Image

Our built-in support for GraalVM Native Image compilation now includes pdfHTML. This means you can potentially build a complete template conversion executable to run anywhere, using only the Core and pdfHTML modules you need, while benefiting from the performance gains that GraalVM brings with its JIT compilation process.

SVG and CSS Improvements

As mentioned above, pdfHTML hugely benefits from the extended SVG and CSS coverage in this release. In particular, the text-decoration, marker-mid, and stroke-dash-array additions, along with support for different CSS origins in SVG.

There are improvements to SVG Text, which also benefit pdfCalligraph. Along with that are numerous refinements and bugfixes to aid utilizing SVG and CSS for templating. One thing to call out is the improved Flex container usage with tables. Speaking of which…

Table and Forms Improvements

We’ve already mentioned the massive performance increase for tables in Core, and HTML template conversions with tables will take great advantage of this. Using pdfHTML for PDF/A and PDF/UA conformance will also see especially large performance increases, due to the tagged table optimizations.

In addition, the conversion of HTML forms for PDF/UA conformance is improved.

New Features

  • GraalVM Native Image support
  • Extended SVG and CSS coverage

Improvements

  • Table performance improvements
  • Support relative values for width/height SVG element attributes
  • Different CSS origins support in SVG
  • Apply links alternate description according to UA standard
  • Support external CSS for HTML embedded SVG
  • Support CSS @import url() rule to reference external resources

Bug Fixes

  • StringIndexOutOfBoundsException if url is without closing bracket
  • SVG: fix percent width&height resolving of top level SVG when it is used from html
  • Flex container with table splitup issue
  • HTML, SVG: properly handle svg images in html with set background-size and viewbox
  • Issue with applying justify align in condensed fonts (MS PGothic)
  • HTML: explicit background image size should respect element size
  • Renderer splitup issue
  • PNullReferenceException for missing image

pdfHTML 6.0.0

18 Nov 09:58
6.0.0
Compare
Choose a tag to compare

pdfHTML is an iText Core add-on for creating PDF from HTML/XML (and associated CSS).

This release includes a bug fix relating to repeating table headers. When using FlexContainerRendererDivRendererTableRenderer hierarchies, it could result in an incorrect size calculation. This is now resolved.

In addition, the version number has been bumped for compatibility with iText Core 9.0 and License Key Library 4.2.0.

Bug Fixes

  • Repeating table header in HTML causes incorrect size calculation when overflowing to next page

pdfHTML 5.0.5

24 Jul 11:24
5.0.5
Compare
Choose a tag to compare

pdfHTML is an iText Core add-on for creating PDF from HTML/XML (and associated CSS).

As noted in the Core release notes, this release of pdfHTML now supports the CSS Grid Layout Module allowing highly-flexible grid-based layouts. With Grid Layout supporting two-dimensional layouts of both rows and columns, this gives you additional capabilities when designing templates for PDF creation with pdfHTML.

CSS Grid Layout is beginning to see wider adoption, and is supported by all current major web browsers. A number of users expressed a desire for Grid layout support in iText and pdfHTML and we were happy to oblige.

The majority of Grid features are fully supported in pdfHTML 5.0,5, with only the inline-grid values of the display property, and subgrid values of the grid-template-columns and grid-template-rows properties not currently implemented. Since data shows these properties are not widely used, they are not currently a priority. However, if you see a pressing need for pdfHTML to support them, please let us know!

In other news, a bug with Azure resource loading on .NET 6.0 was fixed in this release.

New Features

  • CSS Grid Layout Module support

Bug Fixes

  • Azure resources fail to load on .NET 6.0

pdfHTML 5.0.4

30 Apr 09:37
5.0.4
Compare
Choose a tag to compare

pdfHTML is an iText Core add-on to create PDF from HTML/XML (and associated CSS).

The main thing of note in this release is pdfHTML now allows more customization of bookmarks (known as outlines in the PDF specification) using the OutlineHandler component, along with improved out-of-the-box behavior.

In addition, we’ve fixed a bug where empty table rows may not be converted correctly in certain cases.

Improvements

  • More flexible and customizable outline handling

Bug Fixes

  • Empty initial rows in a table may not be correctly converted to layout

pdfHTML 5.0.3

07 Feb 14:31
5.0.3
Compare
Choose a tag to compare

pdfHTML is an iText Core add-on to create PDF from HTML/XML (and associated CSS).

As noted in the Core release notes, we’ve implemented checks and improvements during the creation of PDF/A and PDF/UA to make the creation of both archivable and accessible PDF documents easier. Using HTML as a source is a great way to create such documents, so pdfHTML users naturally benefit greatly from this addition.

We’ve also fixed some bugs with converting layout elements and an exception being thrown when emojis are present in HTML to PDF/A conversions.

Improvements

  • General improvements for PDF/A and PDF/A creation

Bug Fixes

  • IButton tag worker may throw NPE on convert from elements
  • Conversion from HTML properties to layout elements in html2pdf doesn't take into account PDFConformanceLevel
  • Converting HTML with emojis to PDF/A will cause an exception even when the emoji is included in the font's glyphs

pdfHTML 5.0.2

25 Oct 15:10
5.0.2
Compare
Choose a tag to compare

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

02 Aug 15:08
5.0.1
Compare
Choose a tag to compare

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

10 May 12:54
5.0.0
Compare
Choose a tag to compare

pdfHTML is an iText Core add-on for .NET 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

16 Jan 09:52
4.0.5
Compare
Choose a tag to compare

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