Skip to main content
Skip table of contents

What features are supported or unsupported in pdfHTML?

This FAQ provides a detailed overview of the support for PDF standards and HTML and CSS features in the pdfHTML add-on for iText Core. It is intended to help developers understand the current capabilities and limitations of pdfHTML when generating PDF documents from HTML content.

The information presented here is based on the feature set available in pdfHTML 6.2.0, released with iText Core 9.2.0. This document will be updated to reflect any changes, enhancements, and newly supported features in future releases.

PDF Standards Support

Our implementation supports converting HTML documents to PDF files compliant with PDF/UA-1, PDF/UA-2, as well as PDF/A standards (including PDF/A-1, PDF/A-2, PDF/A-3, and PDF/A-4). This ensures the generation of documents that meet modern requirements for both accessibility and long-term archiving.

HTML tags currently supported by pdfHTML

Expand content

HTML5 Tag

Supported

Description

<!--...-->

Defines a comment

<!DOCTYPE> 

Defines the document type

<a>

Defines a hyperlink

<abbr>

Defines an abbreviation or an acronym

<address>

Defines contact information for the author/owner of a document

<applet>

Not supported in HTML5. Use <embed> or <object> instead. Defines an embedded applet

<area>

Defines an area inside an image-map

<article>

Defines an article

<aside>

Defines content aside from the page content

<audio>

Defines sound content

<b>

Defines bold text

<base>

Specifies the base URL/target for all relative URLs in a document

<basefont>

Not supported in HTML5. Use CSS instead. Specifies a default color, size, and font for all text in a document

<bdi>

Isolates a part of text that might be formatted in a different direction from other text outside it

<bdo>

Overrides the current text direction

<blockquote>

Defines a section that is quoted from another source

<body>

Defines the document's body

<br>

Defines a single line break

<button>

Defines a clickable button

<canvas>

Used to draw graphics, on the fly, via scripting (usually JavaScript)

<caption>

Defines a table caption

<cite>

Defines the title of a work

<code>

Defines a piece of computer code

<col>

Specifies column properties for each column within a <colgroup> element 

<colgroup>

Specifies a group of one or more columns in a table for formatting

<datalist>

Specifies a list of pre-defined options for input controls

<dd>

Defines a description/value of a term in a description list

<del>

Defines text that has been deleted from a document

<details>

Defines additional details that the user can view or hide

<dfn>

Represents the defining instance of a term

<dialog>

Defines a dialog box or window

<div>

Defines a section in a document

<dl>

Defines a description list

<dt>

Defines a term/name in a description list

<em>

Defines emphasized text 

<embed>

Defines a container for an external (non-HTML) application

<fieldset>

Groups related elements in a form

<figcaption>

Defines a caption for a <figure> element

<figure>

Specifies self-contained content

<footer>

Defines a footer for a document or section

<form>

Defines an HTML form for user input

<h1> to <h6>

Defines HTML headings

<head>

Defines information about the document

<header>

Defines a header for a document or section

<hr>

Defines a thematic change in the content

<html>

Defines the root of an HTML document

<i>

Defines a part of text in an alternate voice or mood

<iframe>

Defines an inline frame

<img>

Defines an image

<input>

Defines an input control

<ins>

Defines a text that has been inserted into a document

<kbd>

Defines keyboard input

<keygen>

Defines a key-pair generator field (for forms)

<label>

Defines a label for an <input> element

<legend>

Defines a caption for a <fieldset> element

<li>

Defines a list item

<link>

Defines the relationship between a document and an external resource (most used to link to style sheets)

<main>

Specifies the main content of a document

<map>

Defines a client-side image-map

<mark>

Defines marked/highlighted text

<menu>

Defines a list/menu of commands

<menuitem>

Defines a command/menu item that the user can invoke from a popup menu

<meta>

Defines metadata about an HTML document

<meter>

Defines a scalar measurement within a known range (a gauge)

<nav>

Defines navigation links

<noscript>

Defines an alternate content for users that do not support client-side scripts

<object>

❌ We support only SVG content

Defines an embedded object

<ol>

Defines an ordered list

<optgroup>

Defines a group of related options in a drop-down list

<option>

Defines an option in a drop-down list

<output>

Defines the result of a calculation

<p>

Defines a paragraph

<pre>

Defines preformatted text

<progress>

Represents the progress of a task

<q>

Defines a short quotation

<rp>

Defines what to show in browsers that do not support ruby annotations

<rt>

Defines an explanation/pronunciation of characters (for East Asian typography)

<ruby>

Defines a ruby annotation (for East Asian typography)

<s>

Defines text that is no longer correct

<samp>

Defines sample output from a computer program

<script>

Defines a client-side script

<section>

Defines a section in a document

<select>

Defines a drop-down list

<small>

Defines smaller text

<source>

Defines multiple media resources for media elements (<video> and <audio>)

<span>

Defines a section in a document

<strong>

Defines important text

<style>

Defines style information for a document

<sub>

Defines subscripted text

<summary>

Defines a visible heading for a <details> element

<sup>

Defines superscripted text

<table>

Defines a table

<tbody>

Groups the body content in a table

<td>

Defines a cell in a table

<textarea>

Defines a multiline input control (text area)

<tfoot>

Groups the footer content in a table

<th>

Defines a header cell in a table

<thead>

Groups the header content in a table

<time>

Defines a date/time

<title>

Defines a title for the document

<tr>

Defines a row in a table

<track>

Defines text tracks for media elements (<video> and <audio>)

<u>

Defines text that should be stylistically different from normal text

<ul>

Defines an unordered list

<var>

Defines a variable

<video>

Defines a video or movie

<wbr>

Defines a possible line-break

CSS modules currently supported by pdfHTML

Expand content

CSS backgrounds and borders

Property

Supported

background-attachment

background-clip

background-color

background-image

background-origin

background-position

background-repeat

background-size

background

background-position-x

background-position-y

border-bottom-color

border-bottom-style

border-bottom-width

border-bottom

border-left-color

border-left-style

border-left-width

border-left

border-right-color

border-right-style

border-right-width

border-right

border-top-color

border-top-style

border-top-width

border-top

border-color

border-style

border-width

border

border-bottom-left-radius

border-bottom-right-radius

border-top-left-radius

border-top-right-radius

border-radius

border-image-outset

border-image-repeat

border-image-slice

border-image-source

border-image-width

border-image

box-shadow

CSS basic user interface

Property

Supported

accent-color

appearance

caret

caret-color

caret-shape

cursor

nav-down

nav-left

nav-right

nav-up

outline

outline-color

outline-style

outline-width

outline-offset

pointer-events

resize

user-select

CSS fonts

Property

Supported

font

font-family

font-feature-settings

font-kerning

font-language-override

font-optical-sizing

font-palette

font-size

font-size-adjust

font-stretch

font-style

font-weight

font-synthesis

font-synthesis-position

font-synthesis-small-caps

font-synthesis-style

font-synthesis-weight

font-variant

font-variant-alternates

font-variant-caps

font-variant-east-asian

font-variant-emoji

font-variant-ligatures

font-variant-numeric

font-variant-position

font-variation-settings

CSS box alignment

Property

Supported

align-content

align-items

align-self

column-gap

gap

justify-content

justify-items

justify-self

place-content

place-items

place-self

row-gap

CSS box model

Property

Supported

margin

margin-bottom

margin-left

margin-right

margin-top

margin-trim

padding

padding-bottom

padding-left

padding-right

padding-top

CSS box sizing

Property

Supported

aspect-ratio

box-sizing

contain-intrinsic-block-size

contain-intrinsic-height

contain-intrinsic-inline-size

contain-intrinsic-size

contain-intrinsic-width

height

max-height

max-width

min-height

min-width

width

CSS colors

Property

Supported

color

opacity

CSS compositing and blending

Property

Supported

background-blend-mode

isolation

mix-blend-mode

CSS display

Property

Supported

display

order

visibility

reading-flow

reading-order

CSS filter effects

Property

Supported

backdrop-filter

filter

CSS flexible box layout

Property

Supported

align-content

align-items

align-self

flex

flex-basis

flex-direction

flex-flow

flex-grow

flex-shrink

flex-wrap

justify-content

CSS fragmentation

Property

Supported

box-decoration-break

break-after

break-before

break-inside

orphans

widows

CSS generated content

Property

Supported

content

quotes

CSS grid layout

Property

Supported

grid-auto-columns

grid-auto-flow

grid-auto-rows

grid-template-columns

grid-template-rows

grid-template-areas

grid-template

grid

grid-column-start

grid-column-end

grid-column

grid-row-start

grid-row-end

grid-row

grid-area

CSS images

Property

Supported

image-orientation

image-rendering

image-resolution

object-fit

object-position

CSS inline layout

Property

Supported

alignment-baseline

dominant-baseline

initial-letter

line-height

text-box-edge

text-box-trim

text-box

vertical-align

CSS lists and counters

Property

Supported

counter-increment

counter-reset

counter-set

list-style-image

list-style-type

list-style-position

list-style

CSS media queries

This module contains @import and @media rules that we support

CSS motion path

Property

Supported

offset

offset-anchor

offset-distance

offset-path

offset-position

offset-rotate

CSS multi-column layout

Property

Supported

break-after

break-before

break-inside

column-fill

column-gap

column-span

column-rule

column-rule-color

column-rule-style

column-rule-width

columns

column-count

column-width

CSS nesting

This module is broadly supported, however, you may experience issues with nesting tags relating to image alignment, font sizes, or inline tables.

CSS paged media

We support only a @page rule not a page property.

CSS positioned layout

Property

Supported

top

right

bottom

left

inset

inset-inline

inset-inline-start

inset-inline-end

inset-block

inset-block-start

inset-block-end

position

z-index

overlay

CSS pseudo-elements

Selectors

Supported

::after

::before

::file-selector-button

::first-letter

::first-line

::grammar-error

::highlight()

::marker

::placeholder

::selection

::spelling-error

::target-text

CSS selectors

We support the following selectors: empty, first-child, first-of-type, last-child, last-of-type, not, nth-child(), nth-of-type(), nth-last-child(), nth-last-of-type().

CSS table

Property

Supported

border-collapse

border-spacing

caption-side

empty-cells

table-layout

CSS text color

Property

Supported

hanging-punctuation

hyphenate-character

hyphenate-limit-chars

hyphens

letter-spacing

line-break

overflow-wrap (and the word-wrap alias)

tab-size

text-align

text-align-last

text-indent

text-justify

text-spacing-trim (Experimental)

text-transform

text-wrap

text-wrap-mode

text-wrap-style

white-space

white-space-collapse

word-break

word-spacing

CSS text decoration

Property

Supported

text-decoration

text-decoration-color

text-decoration-line

text-decoration-skip

text-decoration-skip-ink

text-decoration-style

text-decoration-thickness

text-emphasis

text-emphasis-color

text-emphasis-position

text-emphasis-style

text-shadow

text-underline-offset

text-underline-position

CSS writing modes

Property

Supported

direction

text-combine-upright

text-orientation

unicode-bidi

writing-mode

CSS modules currently unsupported by pdfHTML

The following list contains modules which are either not supported by pdfHTML, or are only partially implemented:

Modules not applicable to PDF rendering

Expand content
  • CSS animations

  • CSS transitions

  • CSS scroll-driven animations

  • CSS scroll snap

  • CSS scroll anchoring

  • CSS overscroll behavior

  • CSS scrollbars styling

  • CSSOM view

  • CSS shadow parts

  • CSS shapes

  • CSS anchor positioning

  • CSS values and units (many are dynamic or viewport-relative)

Modules unsupported by the PDF specification

Expand content

These modules rely on browser or runtime features that PDF does not support:

  • CSS masking

  • CSS namespaces

  • CSS ruby layout

  • CSS containment

  • CSS logical properties and values (except block-size)

  • CSS transforms (only transform property is partially supported)

  • CSS custom properties for cascading variables

  • CSS properties and values API

  • CSS color adjustment

  • CSS conditional rules

  • CSS scoping

Modules not yet implemented or partially supported

Expand content

The following may be technically feasible but are not yet fully supported in pdfHTML:

  • CSS cascading and inheritance (only all property supported)

  • CSS counter styles (no properties implemented)

  • CSS overflow (only overflow property is partially supported)

JavaScript errors detected

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

If this problem persists, please contact our support.