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
HTML5 Tag | Supported | Description |
|---|---|---|
❌ | Defines a comment | |
❌ | Defines the document type | |
✅ | Defines a hyperlink | |
✅ | Defines an abbreviation or an acronym | |
✅ | Defines contact information for the author/owner of a document | |
❌ | Not supported in HTML5. Use | |
❌ | Defines an area inside an image-map | |
✅ | Defines an article | |
✅ | Defines content aside from the page content | |
❌ | Defines sound content | |
✅ | Defines bold text | |
❌ | Specifies the base URL/target for all relative URLs in a document | |
❌ | Not supported in HTML5. Use CSS instead. Specifies a default color, size, and font for all text in a document | |
✅ | Isolates a part of text that might be formatted in a different direction from other text outside it | |
❌ | Overrides the current text direction | |
✅ | Defines a section that is quoted from another source | |
✅ | Defines the document's body | |
✅ | Defines a single line break | |
✅ | Defines a clickable button | |
✅ | Used to draw graphics, on the fly, via scripting (usually JavaScript) | |
✅ | Defines a table caption | |
✅ | Defines the title of a work | |
✅ | Defines a piece of computer code | |
✅ | Specifies column properties for each column within a | |
✅ | Specifies a group of one or more columns in a table for formatting | |
❌ | Specifies a list of pre-defined options for input controls | |
✅ | Defines a description/value of a term in a description list | |
✅ | Defines text that has been deleted from a document | |
❌ | Defines additional details that the user can view or hide | |
✅ | Represents the defining instance of a term | |
❌ | Defines a dialog box or window | |
✅ | Defines a section in a document | |
✅ | Defines a description list | |
✅ | Defines a term/name in a description list | |
✅ | Defines emphasized text | |
❌ | Defines a container for an external (non-HTML) application | |
❌ | Groups related elements in a form | |
✅ | Defines a caption for a | |
✅ | Specifies self-contained content | |
✅ | Defines a footer for a document or section | |
✅ | Defines an HTML form for user input | |
✅ | Defines HTML headings | |
✅ | Defines information about the document | |
✅ | Defines a header for a document or section | |
✅ | Defines a thematic change in the content | |
✅ | Defines the root of an HTML document | |
✅ | Defines a part of text in an alternate voice or mood | |
❌ | Defines an inline frame | |
✅ | Defines an image | |
✅ | Defines an input control | |
✅ | Defines a text that has been inserted into a document | |
✅ | Defines keyboard input | |
❌ | Defines a key-pair generator field (for forms) | |
✅ | Defines a label for an | |
✅ | Defines a caption for a | |
✅ | Defines a list item | |
✅ | Defines the relationship between a document and an external resource (most used to link to style sheets) | |
✅ | Specifies the main content of a document | |
❌ | Defines a client-side image-map | |
✅ | Defines marked/highlighted text | |
❌ | Defines a list/menu of commands | |
❌ | Defines a command/menu item that the user can invoke from a popup menu | |
✅ | Defines metadata about an HTML document | |
❌ | Defines a scalar measurement within a known range (a gauge) | |
✅ | Defines navigation links | |
❌ | Defines an alternate content for users that do not support client-side scripts | |
❌ We support only SVG content | Defines an embedded object | |
✅ | Defines an ordered list | |
✅ | Defines a group of related options in a drop-down list | |
✅ | Defines an option in a drop-down list | |
❌ | Defines the result of a calculation | |
✅ | Defines a paragraph | |
✅ | Defines preformatted text | |
❌ | Represents the progress of a task | |
✅ | Defines a short quotation | |
❌ | Defines what to show in browsers that do not support ruby annotations | |
❌ | Defines an explanation/pronunciation of characters (for East Asian typography) | |
❌ | Defines a ruby annotation (for East Asian typography) | |
✅ | Defines text that is no longer correct | |
✅ | Defines sample output from a computer program | |
❌ | Defines a client-side script | |
✅ | Defines a section in a document | |
✅ | Defines a drop-down list | |
✅ | Defines smaller text | |
❌ | Defines multiple media resources for media elements ( | |
✅ | Defines a section in a document | |
✅ | Defines important text | |
✅ | Defines style information for a document | |
✅ | Defines subscripted text | |
❌ | Defines a visible heading for a | |
✅ | Defines superscripted text | |
✅ | Defines a table | |
❌ | Groups the body content in a table | |
✅ | Defines a cell in a table | |
✅ | Defines a multiline input control (text area) | |
✅ | Groups the footer content in a table | |
✅ | Defines a header cell in a table | |
✅ | Groups the header content in a table | |
✅ | Defines a date/time | |
✅ | Defines a title for the document | |
✅ | Defines a row in a table | |
❌ | Defines text tracks for media elements ( | |
✅ | Defines text that should be stylistically different from normal text | |
✅ | Defines an unordered list | |
✅ | Defines a variable | |
❌ | Defines a video or movie | |
❌ | Defines a possible line-break |
CSS modules currently supported by pdfHTML
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
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
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
transformproperty 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
The following may be technically feasible but are not yet fully supported in pdfHTML:
CSS cascading and inheritance (only
allproperty supported)CSS counter styles (no properties implemented)
CSS overflow (only
overflowproperty is partially supported)