Skip to content

CLI reference

kolinsky COMMAND [arguments]
kolinsky --version
kolinsky COMMAND --help

The options have the same names in the Rust crate (RenderOptions, PdfOptions, EngineBuilder) and the Python package; the table below gives the command-line spelling. A value shown as [=VALUE] is optional and only accepted after =.

render

kolinsky render IN... -o OUT [options]

Lays out the inputs (files, URLs or - for standard input) and writes one PDF.

Flag Description
-o, --output FILE the PDF file, - for standard output
--base-url URL the base URL of every input

Render options

Flag Description
-s, --style FILE\|URL a user stylesheet (repeatable)
--no-author-style ignore the document's own styles
--media TYPE the media type of media queries (default print)
--page-size SIZE the page size where the document sets none (a CSS size value)
--margin MARGIN the page margin where the document sets none (a CSS margin value)
--allow-net[=PATTERN] allow network access, or only to URLs matching the pattern (repeatable)
--root DIR the directory local files must be in
--timeout SECONDS the time limit of each fetch (default 30)
--max-resource-size BYTES the size limit of each resource, with an optional K, M or G (default 64M)
--strict[=LIST] fail on diagnostics of all, or of the listed, categories

PDF options

Flag Description
--title TEXT the document title
--author TEXT an author (repeatable)
--subject TEXT the document subject
--keyword TEXT a keyword (repeatable)
--lang TAG the document language (BCP 47)
--creation-date DATE the creation date (RFC 3339)
--pdf-standard LIST PDF/A and PDF/UA levels, comma separated (repeatable)
--tagged write a tagged PDF
--outline write the outline of the document's bookmarks
--pages RANGES the pages written, for example 1-3,5
--attach FILE[:REL] embed a file (repeatable)
--deterministic reproducible output

Fonts

Flag Description
--font-dir DIR a directory of font files (repeatable)
--no-system-fonts do not use the system fonts

Diagnostics

Flag Description
--diagnostics human\|json the format of the diagnostics on standard error (default human)
-q, --quiet print errors only
-v, --verbose print info diagnostics and progress too

inspect

kolinsky inspect IN [--json] [--boxes] [--select CSS] [options]

Lays out one input and prints its pages.

Flag Description
--json print one JSON object
--boxes with --json: the boxes of each page
--select CSS the boxes of the matching elements
--base-url URL the base URL of the input

Render options

Flag Description
-s, --style FILE\|URL a user stylesheet (repeatable)
--no-author-style ignore the document's own styles
--media TYPE the media type of media queries (default print)
--page-size SIZE the page size where the document sets none (a CSS size value)
--margin MARGIN the page margin where the document sets none (a CSS margin value)
--allow-net[=PATTERN] allow network access, or only to URLs matching the pattern (repeatable)
--root DIR the directory local files must be in
--timeout SECONDS the time limit of each fetch (default 30)
--max-resource-size BYTES the size limit of each resource, with an optional K, M or G (default 64M)
--strict[=LIST] fail on diagnostics of all, or of the listed, categories

Fonts

Flag Description
--font-dir DIR a directory of font files (repeatable)
--no-system-fonts do not use the system fonts

Diagnostics

Flag Description
--diagnostics human\|json the format of the diagnostics on standard error (default human)
-q, --quiet print errors only
-v, --verbose print info diagnostics and progress too

serve

kolinsky serve --stdio [options]

Answers JSON requests, one per line on standard input, with one JSON response per line.

Fonts

Flag Description
--font-dir DIR a directory of font files (repeatable)
--no-system-fonts do not use the system fonts

fonts

kolinsky fonts [--json] [options]

Lists the font faces in matching order.

Flag Description
--json print a JSON list

Fonts

Flag Description
--font-dir DIR a directory of font files (repeatable)
--no-system-fonts do not use the system fonts

Exit status

0 on success (diagnostics may have been printed), non-zero on an error.