Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

What is not supported

For individual CSS properties see the property support table, and for wkhtmltopdf’s options see the option mapping.

JavaScript is not executed

<script> elements are skipped.

This rules out the following.

  • Building the DOM with JavaScript and then producing a PDF, such as rendering a single-page application as it stands
  • Including a chart drawn on the client with something like Chart.js
  • Injecting page numbers or headers with JavaScript; use the placeholders instead

Ranges

The input is a single HTML file

Several HTML files cannot be listed and merged into one PDF; there is no equivalent of wkhtmltopdf’s positional arguments. A cover page is given with --cover and a table of contents with --toc.

Merging, splitting, and extracting pages from existing PDFs are out of scope as well.

PDF features

FeatureWhen
Outlines, that is bookmarksNot supported. A table of contents inside the document can be built with --toc
Fillable forms (AcroForm)Not supported. Elements such as <input> are drawn for appearance only
Encryption, passwords, and digital signaturesNot supported
Conformance with standards such as PDF/A and PDF/XNot supported
Tagged PDF, for accessibilityNot supported
Attachments, and annotations other than linksNot supported; only link annotations are

Links written as <a href> become PDF annotations, both for external URLs and for #id targets within the document.

Image and font formats

  • Images may be PNG, JPEG, or WebP only; SVG and GIF are not supported
  • Fonts may be TTF or OTF only; WOFF and WOFF2 are not supported
  • Even with --grayscale, JPEG and CMYK images stay in colour

The main CSS limitations

Taken feature by feature, the following are not supported.

  • Vertical writing with writing-mode and text-orientation, the logical properties such as margin-inline, and right-to-left text through direction
  • Multi-column layout, columns and column-count
  • Gradients such as linear-gradient(), and multiple backgrounds
  • Animations, transitions, and filter, since the output is static
  • position: sticky, display: inline-flex and inline-grid, and subgrid
  • :is(), :where(), :has(), ::first-line, and ::marker

Limitations specific to streaming mode

With --streaming, the total page count, meaning counter(pages) and [topage], and the table of contents, --toc, become unavailable. See Streaming mode for the details.

Looking ahead

Embedding a JavaScript engine remains something to consider if the need arises. Items above that are not deliberate non-goals, such as PDF outlines, may well be supported later.