Supported browser rendering

View Source

The HTML renderer supports a document-oriented subset of browser rendering for reports, invoices, statements, forms, and labels. Use the overview below to choose a layout, then follow the linked reference for supported values and restrictions.

Supported behavior

AreaWhat you can use
HTML and textHeadings, paragraphs, inline emphasis, lists, links, character references, and supported form controls
CSSSupported selectors, the cascade, custom properties, generated content, colors, borders, and spacing
Sizing and layoutBlock and inline layout, flexbox, grid, size constraints, text wrapping, and relative or absolute positioning
TablesColumn sizing, spanning cells, nested tables, repeated headers, and separate or collapsed borders
Images and backgroundsJPEG, supported PNG formats, self-contained SVG, image fitting, and background sizing and repetition
PagesPage sizes and margins, automatic and explicit breaks, running headers and footers, and page numbers
FontsBundled DejaVu Sans, registered TrueType fonts, optional system-font discovery, and glyph fallback

Supported controls create interactive AcroForm fields by default; use forms: :static for artwork only. See PDF forms. This subset does not include JavaScript or full browser layout and typography. See Known limits before adapting a browser template. Unsupported HTML tags and CSS properties are reported through the diagnostic contract. Some accepted @page declarations are ignored, including page-orientation, marks, bleed, and margins that cannot be normalized. See page declarations without an effect before relying on successful rendering as evidence that page settings were applied.

Visual parity

We compare rendered documents with Chromium at 72 DPI. Every fixture enforces a strict ceiling of less than 1% differing pixels. A pixel differs when at least one RGB channel differs by more than 12 out of 255. Each fixture also checks the page count and its existing average channel-delta limit.

Chromium and the native renderer load the same bundled DejaVu font files. Two font fixtures also use the same bundled Liberation font files. Each run records SHA-256 hashes of these files alongside its raster output. The quality matrix checks the threshold on every supported Elixir runtime. Browser and rasterizer updates can change the result, so failures must be investigated and corrected when those tools change. The measured bound applies to these representative fixtures within the supported HTML/CSS subset; arbitrary documents or different font files may have a different result.

These percentages describe visual comparisons, not a percentage of browser features supported. Start with the rendering examples for working templates.

The suite covers all supported PNG color types and sample depths, including Adam7 interlacing, in the png_formats fixture. The table below includes every current fixture, including invoices, statements, forms, and labels.

Measured comparisons

The following run used Chromium 151.0.7922.173 and Poppler 25.03.0 at 72 DPI. Values are fractions rounded to six decimal places. For multipage documents, "Changed" and "Average" show the maximum page value. All 67 fixtures across 80 pages met the strict <0.01 changed-pixel gate. The government application form had the largest value at 0.009673. Each comparison writes measurements to tmp/browser_parity/<fixture>/stats.exs.

FixtureChangedAveragePages
absolute_positioning0.0000000.0000001
background_images0.0050260.0009231
block_box_model0.0019990.0004731
body_grid0.0016900.0002401
body_padding_background0.0019440.0002891
border_style_variants0.0095810.0029111
box_sizing_and_margins0.0013160.0002191
break_variants0.0006400.0003484
cmyk_jpeg_colors0.0000000.0000001
computed_custom_properties0.0000000.0000001
css_cascade_selectors0.0078790.0020181
css_remaining_supported_values0.0015870.0007951
display_lists_and_inline_block0.0062660.0025421
distributed_gaps0.0013890.0009261
empty_flex_height0.0000000.0000001
flex_direction_and_justification0.0016730.0006901
flex_grid_alignment0.0011120.0003841
fonts_and_print_media0.0002870.0000371
generated_content_counters0.0075720.0021731
government_application_form0.0096730.0030221
grid_explicit_sizes0.0000000.0000001
grid_span_end0.0000000.0000001
grid_sparse_placement0.0000000.0000001
grid_tracks_and_placement0.0019190.0004391
hidden_tables0.0000000.0000001
html_semantics_typography0.0040440.0023091
image_object_fitting0.0020470.0005311
images_data_uris0.0047780.0026891
inline_positioning0.0001570.0000361
inline_text_flow0.0060120.0024301
invoice_0120.0045050.0009711
layout_compositions_remaining0.0023150.0009251
ligature_letter_spacing0.0062270.0010411
links_entities_and_protocols0.0009880.0003801
material_requisition0.0051620.0018622
multi_page_report_0120.0077590.0022452
nested_table_collapsed_borders0.0080500.0032321
nested_table_grid_flex0.0062740.0020491
page_furniture0.0033360.0015322
page_geometry_asymmetric0.0006800.0003431
page_rules_landscape0.0009280.0001681
pagination_breaks0.0001200.0000192
paragraph_pagination0.0000000.0000002
png_formats0.0077180.0022931
png_transparent_color0.0000000.0000001
purchase_order0.0040200.0010181
quoted_at_rules0.0007100.0001351
quoted_variables0.0000000.0000001
root_absolute_pagination0.0000000.0000002
statement_0120.0057910.0013901
static_form_controls0.0057750.0017911
stock_sticker0.0026160.0003801
system_font_inheritance0.0023560.0007021
table_collapsed_borders0.0093290.0034441
table_column_layout0.0024940.0007741
table_header_near_page_row0.0014810.0002602
table_outer_border_pagination0.0062730.0039283
table_pagination_headers0.0027270.0019882
table_rowspan_tfoot0.0073360.0026671
table_separate_borders0.0004750.0002441
text_style_variants0.0069130.0019001
trim_card0.0088700.0016291
units_and_sizing0.0033770.0014311
unsupported_glyph_replacement0.0018750.0008601
weight_inheritance0.0000000.0000001
whitespace_pre_line0.0005590.0001021
zero_font_size0.0000000.0000001