# kolinsky
> kolinsky renders HTML and CSS to PDF. It is written in Rust and ships as a Rust crate (`kolinsky`), a command line (`kolinsky render in.html -o out.pdf`) and a Python package (`kolinsky`), with no system dependencies on Linux, macOS and Windows. It supports paged media with margin boxes, flexbox, grid, multi-column, floats, tables, web fonts and complex scripts, SVG and images, links and bookmarks, PDF/A, PDF/UA and tagged PDF. Network access is off by default.
- Install: `cargo add kolinsky`, `pip install kolinsky`, or the prebuilt command line from the installation page.
- `kolinsky COMMAND --help` is authoritative for the command line; the option names are the same in Rust and Python.
- Check a layout without writing a PDF: `kolinsky inspect in.html --json --select CSS`.
## Overview
- [kolinsky](https://kolinsky.spenhouet.com/): HTML and CSS to PDF, in Rust, in milliseconds. A Rust crate, a command line and a Python package with no system dependencies.
- [Introduction](https://kolinsky.spenhouet.com/introduction/): What kolinsky is, how it turns HTML and CSS into PDF, and where to go next in these docs.
- [Benchmarks](https://kolinsky.spenhouet.com/benchmarks/): How fast kolinsky renders HTML to PDF compared with other engines, and how much memory it uses, with the method of measurement.
- [Conformance](https://kolinsky.spenhouet.com/conformance/): How much of CSS, SVG and the PDF features kolinsky renders correctly, measured with the web-platform-tests reftests and PDF checks, next to other HTML-to-PDF engines.
- [Use with AI agents](https://kolinsky.spenhouet.com/agents/): Use kolinsky with AI coding agents. Download the agent skill, or point any agent at llms.txt.
- [Contributing](https://kolinsky.spenhouet.com/contributing/): How to build kolinsky from its source tree, run the tests and the scenario suite, add a scenario, and find your way around the code.
- [FAQ](https://kolinsky.spenhouet.com/faq/): Answers to common questions about kolinsky - JavaScript, missing images and fonts, reproducible output, threads, other languages, licence.
- [Changelog](https://kolinsky.spenhouet.com/changelog/): The changes of each kolinsky release.
## Getting started
- [Getting started](https://kolinsky.spenhouet.com/getting-started/): Install kolinsky and render your first PDF from Rust, the command line or Python.
- [Installation](https://kolinsky.spenhouet.com/getting-started/installation/): Install the kolinsky Rust crate, the Python package or the prebuilt command line on Linux, macOS and Windows.
- [Rust](https://kolinsky.spenhouet.com/getting-started/rust/): Render HTML to PDF from Rust with the kolinsky crate.
- [Command line](https://kolinsky.spenhouet.com/getting-started/cli/): Render HTML to PDF with the kolinsky command line, and inspect the layout of a document.
- [Python](https://kolinsky.spenhouet.com/getting-started/python/): Render HTML to PDF from Python with the kolinsky package.
## Guides
- [Guides](https://kolinsky.spenhouet.com/guides/): How to set up pages, use fonts, images and links, write footnotes and print CSS, choose PDF options, control resource loading, read diagnostics and render fast.
- [Pages and page setup](https://kolinsky.spenhouet.com/guides/pages/): Set the page size and margins with @page, use named pages, put headers and footers in margin boxes, number pages and control page breaks.
- [Fonts](https://kolinsky.spenhouet.com/guides/fonts/): Where kolinsky finds fonts, how it chooses a face for each character, web fonts with @font-face, and right-to-left and complex scripts.
- [Images and SVG](https://kolinsky.spenhouet.com/guides/images-svg/): "Raster images and SVG in HTML and CSS: formats, sizing, object-fit, resolution, orientation, inline SVG and what SVG features are drawn."
- [Links, bookmarks and the outline](https://kolinsky.spenhouet.com/guides/links/): Internal and external links, named destinations, bookmarks from headings and CSS, and the PDF outline.
- [Footnotes and paged-media features](https://kolinsky.spenhouet.com/guides/gcpm/): Footnotes, running headers and footers, strings, cross-references, tables of contents with leaders, and bookmarks.
- [PDF output](https://kolinsky.spenhouet.com/guides/pdf-output/): Metadata, attachments, PDF versions, PDF/A, PDF/UA and tagged PDF, page ranges and reproducible output.
- [Resource loading and security](https://kolinsky.spenhouet.com/guides/resources/): What kolinsky loads, the network off by default, URL patterns, the root directory, limits and custom fetchers.
- [Diagnostics, logging and strict mode](https://kolinsky.spenhouet.com/guides/diagnostics/): The diagnostics kolinsky reports with every result, how they are printed and logged, strict mode and the errors of a call.
- [Performance](https://kolinsky.spenhouet.com/guides/performance/): Reuse one engine, render from several threads, lay out once and write several PDFs, and run kolinsky as a worker process.
## Reference
- [Reference](https://kolinsky.spenhouet.com/reference/): The kolinsky command-line options, the Python API, the CSS properties it supports, the PDF features it writes and its diagnostic codes.
- [CLI reference](https://kolinsky.spenhouet.com/reference/cli/): Every command and option of the kolinsky command line.
- [Python API](https://kolinsky.spenhouet.com/reference/python/): The classes and functions of the kolinsky Python package, with their signatures and attributes.
- [CSS support](https://kolinsky.spenhouet.com/reference/css/): The CSS properties kolinsky reads, grouped by area, and the shorthands it expands.
- [PDF features](https://kolinsky.spenhouet.com/reference/pdf/): What kolinsky writes into a PDF, the option that turns each feature on, and the PDF/A and PDF/UA levels it supports.
- [Diagnostic codes](https://kolinsky.spenhouet.com/reference/diagnostics/): Every diagnostic code kolinsky reports, with its severity, its strict-mode category and when it is given.
## Optional
- [Full text of these docs](https://kolinsky.spenhouet.com/llms-full.txt): every page in one file
- [Agent skill](https://kolinsky.spenhouet.com/skills/kolinsky.zip): an Agent Skill folder (SKILL.md) for coding agents; also as text at https://kolinsky.spenhouet.com/skills/kolinsky/SKILL.md
- [Rust API](https://docs.rs/kolinsky): the crate's API documentation
- [Python package](https://pypi.org/project/kolinsky/)