Themes and options

Document themes, direction, page size and margins, and custom CSS.

Themes

Document themes apply the same way on the server and in the browser: blue (the default), default, red, green, purple, gold.

JSON
{ "options": { "theme": "green" } }

Options

Option Values Default
direction auto, rtl, ltr, hybrid auto
theme see above blue
page.size A4, Letter, Legal, A5 A4
page.orientation portrait, landscape portrait
page.margin top, right, bottom, left as CSS lengths like 20mm 20mm / 15mm
fontSize 6 to 32 10
cover true, false, "auto" "auto"
title Document title when the front matter has none —
css Extra CSS (up to 50,000 characters) —
png.width 320 to 2400 pixels 794

Unknown options are rejected with an error instead of being silently ignored, so a typo never goes unnoticed.

Custom CSS

It is sanitised before use: no @import and no remote url(). Use it for small tweaks like heading colour or spacing.

CSS
h2 { border-bottom: 2px solid currentColor; }