Skip to content

Conversation

@dependabot
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Sep 3, 2025

Bumps com.itextpdf:html2pdf from 4.0.3 to 6.2.1.

Release notes

Sourced from com.itextpdf:html2pdf's releases.

pdfHTML 6.2.1

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

While this release is only a patch release, it contains a few nice bug fixes and changes. First off, there’s a fix for <br/> tags where a span tag with empty content would be created instead of an Artifact in output PDFs.

It also fixes incorrect href conversion handling when setting the baseUri, and a bug where content would not be tagged as real content or an artifact after conversion.

An issue where OutlineHandler.createDefault() would overwrite an existing ID, breaking inter-document links is resolved. Finally, there’s a change to calculations for aligned content, where inaccurate free space would be calculated.

Bug Fixes

  • DEVSIX-8698: htmlPDF create empty tag for br tag
  • DEVSIX-9066: pdfHtml: <a> with href pointing to an object (#object) become urls after converting instead of GoTo when setting the baseUri
  • DEVSIX-9158: OutlineHandler.createDefault() overwrites existing ID breaking inter document links.
  • DEVSIX-9178: Fix wrong freespace calculations for align content

pdfHTML 6.2.0

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

... (truncated)

Commits
  • 5c9b665 [RELEASE] iText pdfHtml 6.2.1
  • 18f5c58 [RELEASE] pdfHtml 6.2.1
  • 90a7d91 Fix layout table min width calculation in case of predefined width
  • c079562 Test disabled property for checkbox
  • d2cfd16 Test text-alignment for text fields
  • 79258a9 Test letter-spacing and word-spacing for text fields
  • 8be6ccf Test underline and line-through text decorations for text fields
  • 0d4964a Better subset true type fonts (start subsetting loca table)
  • b0a1376 Switch back to MappingConfiguration
  • b848a6b Switch to ExtendedMappingConfiguration
  • Additional commits viewable in compare view

Dependabot compatibility score

You can trigger a rebase of this PR by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Note
Automatic rebases have been disabled on this pull request as it has been open for over 30 days.

Bumps [com.itextpdf:html2pdf](https://github.com/itext/i7j-pdfhtml) from 4.0.3 to 6.2.1.
- [Release notes](https://github.com/itext/i7j-pdfhtml/releases)
- [Commits](itext/itext-pdfhtml-java@4.0.3...6.2.1)

---
updated-dependencies:
- dependency-name: com.itextpdf:html2pdf
  dependency-version: 6.2.1
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot added dependencies Pull requests that update a dependency file java Pull requests that update Java code labels Sep 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file java Pull requests that update Java code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant