hatchmark render turns a dashboard, or one block of it, into a PNG: a chart to drop into a chat,
a doc or a slide, or a whole page to attach to a report. With an --out ending in .pdf it prints
the whole dashboard as a PDF report instead (see PDF reports), and it prints a
Markdown report from reports/ the same way (Reports). The picture is the built page drawn by a
real browser, so it has the same fonts, colours and layout a reader sees at that width and theme.
Like every command it never asks questions and prints one line of JSON when an agent runs it.
Options
A whole page is as tall as its content; the window height does not matter.
Filters
--filter takes the same id and value as the dashboard’s query parameter in the page URL, so
--filter period=last_30_days renders what /explorer/?period=last_30_days shows. The id is the
filter’s id in the dashboard file (see Dashboards).
A browser silently falls back to the default for a value it does not know. Render refuses it
instead, with
HM0002 and the values the filter accepts, so an agent can correct the call.
Filters that are not set keep their defaults. The theme is always --theme: theme is the page’s own
URL parameter, and no filter may use it as its id (HM2050).
PDF reports
--out <file>.pdf prints the whole dashboard as a report for people who read it away from the
dashboard: attached to an email, printed, or filed as the record of a month. It is the page a
reader sees, so the numbers are the same strings, and charts and text stay vector and selectable.
- Paper. Letter by default, or
--paper a4, portrait or--landscape, with half-inch margins. Portrait pages use the 720 px layout, where every block takes the full width; landscape pages use the 976 px layout with the dashboard’s columns. A layout wider than the paper is shrunk to fit, never enlarged. - Cards stay whole. A card or a KPI strip never splits across pages; it moves to the next page instead. A table taller than a page splits between rows, repeats its column headings on every page and prints its total row once, at the end.
- Tables fit or say so. A table wider than the page is shrunk, down to 80% of its size. If it is
still too wide, the columns that do not fit are left out whole, never cut through a number; a line
under the table names them, and render warns with
HM5060. - Controls become a sentence. The period picker, grain switches and segment chips print under
the title as text stating what is selected, such as
Last 30 days (Oct 2 – 31, 2026) · Week · Data through Oct 31, 2026, 6:54 PM EDT. Long segment labels wrap like any sentence. Filters apply as with PNGs. A tooltip or highlight left by the pointer is not printed. - Light theme, white paper. A PDF is always light;
--theme darkis refused. The page’s grey background is not printed; cards keep their borders. - Footer. Every page ends with the dashboard title, what the data runs through, and the page
number, such as
Global sales · Data through Oct 31, 2026, 6:54 PM EDTand2 / 3. The time shows only when the data ends partway through that day.
Looking at the pages
--page-pngs also saves each page of the PDF as a PNG next to it: sales.pdf gives
sales.page-1.png, sales.page-2.png and so on, at two device pixels per CSS pixel. The pictures are drawn
from the PDF itself, so they show exactly where pages break. An agent can look at them to check a
report before handing it over, without a PDF viewer. Drawing them uses PDF.js (Apache-2.0), which
ships inside Hatchmark.
Same input, same bytes
Rendering the same dashboard with the same data, options and browser writes the same file, byte for byte. Chromium stamps the time of printing into the PDF; render replaces it with midnight UTC on the date the data runs through, so a new file means the report changed. The document title is the page title, such asGlobal sales · Global Sales. A different browser version may lay text out slightly
differently, so pin HATCHMARK_BROWSER where the bytes must match across machines.
Output
Human output names the file and its size in pixels. JSON output has the diagnostic report fields, with any warnings from the build, plus:path is relative to --cwd when the file is inside it. block is present only with --block.
For a PDF the output names the paper and the pages instead of the pixels:
shrunk_tables lists each table printed smaller to fit the page, with its scale from 0.8 to 1.
page_pngs is present only with --page-pngs.
What it does
- Loads and checks the project, then runs the dashboard’s queries the way
hatchmark builddoes, reusing results from the build cache. Errors stop it before anything is drawn, with the same diagnostics and exit codes as build. - Renders the page
buildwould write, with the same runtime and fonts, and serves it to the browser from memory. Nothing is written tooutDir. - Opens the page at the width, scale and theme, applies the filters as the page does on load, waits for the fonts and for filters that redraw the page, and saves the screenshot.
The browser
Render needs a Chromium-based browser and looks for one in this order:- The executable
HATCHMARK_BROWSERnames, such as a Chrome or Chromium binary. If it does not start, render stops withHM0011rather than trying another browser. - The Chromium headless shell in Playwright’s browser cache, when it is already there
(
~/Library/Caches/ms-playwrighton macOS,~/.cache/ms-playwrighton Linux, orPLAYWRIGHT_BROWSERS_PATH). - An installed Google Chrome, then Microsoft Edge.
HM0011. Rerun with --install-browser to download the Chromium headless
shell once, about 106 MB on macOS and 132 MB on Linux. Render never downloads without that flag.
A browser draws pages, and Hatchmark pages are HTML and CSS around SVG charts. That is why render
uses one rather than an SVG rasterizer: a rasterizer can draw a chart’s SVG but not the KPI cards,
tables, page grid or filter controls around it, so its pictures would not match the page. Driving the
browser adds about 14 MB to the install (playwright-core, with no browser inside).
Accuracy
The test suite renders pages and cards with filters, themes and widths from 390 to 1440 pixels, and compares each PNG with a screenshot of the pagebuild wrote, opened in the same browser. This is
done twice, with the Chromium headless shell and with a full Chrome build through
HATCHMARK_BROWSER. The PNG must have exactly the browser’s size, and at most 0.1% of its pixels may
differ by more than 24 of 255 on any colour channel. In practice none do.
PDFs are checked by their text: the tests print dashboards on Letter and A4, portrait and
landscape, with filters, extract the PDF’s text, and require exactly the numbers the page shows in
the browser’s print layout, each as often. They also check the paper size, the footer on every
page, the page pictures, and that two renders write the same bytes.
Different browser builds draw text slightly differently, and on Linux the headless shell and full
Chrome place glyphs a fraction of a pixel apart. To match a particular browser exactly, point
HATCHMARK_BROWSER at it.