I7n Pdfhtml Versions Save

pdfHTML is an iText add-on for C# (.NET) that allows you to easily convert HTML and CSS into standards compliant PDFs that are accessible, searchable and usable for indexing.

4.0.0

2 years ago

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, removing deprecated API, and bumping support of .the .NET Framework from 4.5 to 4.6.1 to allow the use of the Microsoft.Extensions.Logging framework.

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.

Breaking Changes

  • Bump to .NET Framework 4.6.1

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

3.0.5

2 years ago

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'

3.0.4

3 years ago

We are really proud of our job for the pdfHTML 3.0.4 release since it brings quite a few improvements and raises pdfHTML to a new level for the creation of PDFs from HTML templates.

The most important feature that has been added is the initial support of the CSS Flexible Layout Box module. This module is currently very popular, as it makes it much easier to design a flexible responsive layout structure without using floats or positioning.

While pdfHTML isn`t able to handle all properties defined in this module quite yet, we expect to widen the number of supported ones in the coming releases. You can refer to the examples section to get insight into how flexbox can be already used for PDF creation.

Another great improvement is performance-related, where the processing of extremely large block elements containing hundreds of children and occupying dozens of pages in the output file takes a few times less memory and computing resources for now.

Besides that, a few annoying bugs have been fixed such as the handling of percentage width values for inline-block elements, or rendering cells distributed between two pages of the output PDF.

The icing on the cake is we've also made improvements to pdfHTML's logging. So now, it will make it much easier to find unsupported styles in your HTML files, since all unsupported flex-related CSS properties and unsupported property values are now recorded.

New Features

  • initial support of flexbox module

Improvements

  • performance of extremely long layout element processing
  • support of justify-content and align-items properties
  • logging of all unsupported flex-related CSS properties and unsupported property values

Bugs

  • fix percent value of inline-block width
  • fix changing of column width after cell`s overflow
  • fix incorrect handling of min-height and max-height
  • fix handling of the page-break-after property inside of page-break-inside: avoid
  • fix NPE when a cell exceeds over two pages

3.0.3

3 years ago

This release of pdfHTML brings many improvements for SVG processing. We are introducing the <pattern> element which is used to define a graphics object that can be "tiled" to cover an area, and the support of SVG defined in HTML. Previously when converting HTML code to PDF we supported either Base64 encoded images or images given by URL. Now, pdfHTML supports SVG images as direct input with the data:image/svg+xml notation.

Besides this, font-relative units for the font-size property in a text element are now supported by pdfHTML 3.0.3 too.

While we're on the subject, we added the support of word-wrap and word-break properties in CSS as well as target-counters and target-counter functions. These functions are crucial for generation of cross-references (widely used for a table of contents) within HTML documents.

Note: .NET Standard 1.6 support was deprecated as of the 3.0.2 release, and so from this release we’re targeting NET Standard 2.0.

New Features

  • SVG: Support <pattern> element
  • Support generating cross-references
  • Supporting SVG in data:image/svg+xml notation
  • Support word-wrap and word-break properties

Improvements

  • SVG: add support of font-relative units for the font-size property in a text element

Bugs

  • Fix body background size
  • Fix stroke-width for <use> tags in SVG
  • Page-break-inside: avoid not being taken into account for floating DIVs

3.0.2

3 years ago

In this release, we extended the support of the CSS specification to add full support of the background properties in CSS: background-repeat, background-position-x, background-position-y, background-blend-mode, background-clip, background-origin, etc. Besides this, the release brings further improvements to SVG processing, thanks to the introduction of the <symbol> element which is used to define reusable symbols within the SVG content. Please take a look at the examples for this release to give you more insight and use cases.

Speaking of wider support for CSS, the object-fit property that is widely used in responsive HTML markup is now supported by pdfHTML 3.0.2 too.

Besides this, we continue to improve the processing of inline text by adding the text-transform: capitalize property and provide more control over the document conversion process to let developers define custom resource resolving strategies by creating their own ResourceRetriever.

New Features

  • Support for custom ResourceResolver
  • Svg element
  • Support object-fit CSS property

Improvements

  • Handling with text-transform: capitalize
  • Full support of all background properties in CSS
  • The convertToDocument constructor with immediate flush disabled

Bugs

  • NPE on the empty letter-spacing declaration
  • CSS files cannot be released after conversion

3.0.1

3 years ago

A new feature in this release is the introduction of support for <linearGradient> in SVG and linear-gradient() in CSS. This is a commonly used element in both CSS and SVG frameworks allowing for progressive transitions between colors in graphical objects. For those of you who are interested, we've produced a code sample demonstrating different implementations of <linearGradient> within our layout engine.

Besides this, we continue to improve our line-height property support that was added for pdfHTML 3.0.0 and added support for setting the background on HTML elements. Something that will continue to be improved (we'll keep you posted!).

Speaking of wider support, Shorthand properties can often improve your CSS code readability. As developers, there's no way, no how, that we'll stand in the way of code readability, so support for the text-decoration Shorthand is baked in too.

We've also improved pdfHTML's <div> Tag processing to better handle splitting.

New Features

  • Initial support of linearGradient in SVG and CSS

Improvements

  • Improve pdfHTML Div Tag processing to better handle splitting
  • Support CSS text-decoration shorthand properly

Bugs

  • Support background-image CSS property for text span element
  • Negative numbers in elements are not shown
  • Apply the line-height property to span elements
  • Html2Pdf+Svg: tag in HTML referring SVG with inner resource doesn't resolve resources correctly

3.0.0

4 years ago

3.0.0

We are particularly excited about the brand new version 3.0 of iText pdfHTML! Check our all the cool stuff we've added, and why we had to bump the major version:

Breaking Changes

  • The ledger page size will now be portrait oriented by default (if you prefer landscape, you just need to specify it)
  • The rendering of HTML as PDF files now has a closer behavior to how a web browser would render the content. If you would like to maintain the previous behavior with pdfHTML 3.x, then we've provided you with the following code

New Features

  • Improve creation and(or) merging of outlines for documents created in pdfHTML
  • Basic implementation of orphan/widow control
  • Support for the line-height property for inline-level elements as well (in addition to improved support for block-level elements)

Improvements

  • Get rid of the difference in line height calculations between HTML and PDF

2.1.7

4 years ago

2.1.7

iText 7.1.10 brings the first quarterly release of 2020 for the iText 7 family, and coincidentally it's on the day that iText, as a project, turns 20! 🎂🥳

For pdfHTML in particular, we are bringing support for the <lang> attribute, and it will also benefit from the <marker> support that has been added to Core.

Tasks

  • pdfHTML: convert "lang" attribute into Lang accessibility property for tagged PDF

2.1.6

4 years ago

2.1.6

Bugs

  • Fix an NPE while comparing two fonts on FontSelector level
  • Font selector produces lines with unexpected multiple fonts when calligraphy fonts are present
  • Explicitly setting dir="ltr" distorts the result of HTML to PDF conversion if pdfCalligraph is loaded for latin text and floating images

Tasks

  • Exclude helper classes/methods for internal usage from the public API documentation
  • Create tests for surrogate pairs in layout and html2pdf
  • Make sure that all add-ons extend ExtendedITextTest
  • Make it easier to override default font family for the descendants of BasicFontProvider and DefaultFontProvider

2.1.5

4 years ago

Improvement

  • Improve flushing of HtmlDocumentRenderer.

Bug

  • Javadoc error in pdfHTML: missing CommonCssConstants#FONT_ABSOLUTE_SIZE_KEYWORDS.
  • Incorrect total number of pages is calculated when counter(pages) is used with page-break-before:always on .
  • Page size defined in @page rule is not parsed correctly for landscape/portrait orientations if the default size is landscape.
  • Readme file has a bad link to releases.