Revecto
Rendering

Forme

Render without a browser, within a subset of HTML and CSS.

Set "engine": "forme".

Forme lays the document out without a browser, which makes it the faster engine.

A document outside its subset is refused with 422 unsupported_document, and unsupported lists what was not supported. A few features are left out without a refusal; see Not rendered and not detected.

Supported

AreaSupport
TextText elements, headings, lists, links.
Tablescolspan, rowspan. <thead> repeats on every page; <tfoot> prints on the last page only. A row that does not fit on the page continues on the next one. break-inside: avoid on a <tr> keeps it whole; a row kept whole that is taller than a page is refused.
FlexboxSupported, without flex-wrap and flex-basis.
GridNumeric tracks and line placement. No named areas or lines, no auto-fill or auto-fit.
Positioningposition: relative and absolute.
Box modelMargins, padding. Solid, dashed and dotted borders through border and border-top/-right/-bottom/-left; border-radius.
BackgroundsSolid background colors.
Pages@page size and margins. Margin boxes such as @top-center, with counter(page) and counter(pages).
Breaksbreak-before, break-after, break-inside, orphans, widows.
Media@media print.

Refused

These are refused with 422 unsupported_document. Examples:

  • position: fixed. Forme would print the element once, on the page where it occurs, not on every page. Use @page margin boxes; see Page setup.
  • ::before and ::after.
  • The + and ~ combinators; :link.
  • Custom properties, var() and the :root selector.
  • Gradients, background images.
  • transform, box-shadow, opacity, z-index.
  • The border-{side}-width and border-{side}-color longhands. Use the border-{side} shorthand, such as border-bottom: 1px solid #000.
  • white-space.
  • The font and list-style shorthands. Use longhand properties such as font-family and font-size.
  • display: grid without grid-template-columns.
  • @supports; @media features other than width and orientation, and not.
  • Any character no available font covers; see Fonts.
  • Arabic-Indic and Persian digits (٠-٩, ۰-۹): Forme draws them in reverse order. Use Western digits (0-9), or render with Chromium.

Not rendered and not detected

The PDF is produced without these:

  • Inline <svg>.
  • SVG, GIF and AVIF images: a gray box is drawn in their place.
  • background, padding and border on inline elements such as <span>.
  • calc() and the vw, vh, ch and ex units. A width set with them makes the element take the full width.
  • An <img> inside a line of text is placed on its own line.

Ignored

These have no effect on a printed page and are ignored without a refusal:

  • Cursors, transitions, animations and @keyframes, pointer-events, user-select, scroll and touch behavior, font smoothing, print-color-adjust, color-scheme, appearance.
  • The :hover, :focus, :focus-visible, :focus-within, :active, :visited and :target states.

Images and fonts

  • Images: PNG, JPEG and WebP, as data: URIs or fetched from a URL.
  • Fonts: TrueType only, registered with @font-face. See Fonts.

Options and limits

  • scale is refused with 400 option_not_supported_by_engine.
  • tagged works as with Chromium: a tagged PDF by default, false for a smaller untagged file.
  • A document too large, too deeply nested or too slow for Forme is refused with 422 engine_limit_exceeded or render_deadline_exceeded; see Error codes.

When Forme refuses a document you cannot change, switch engine to chromium.

On this page