Document editor

Exporting to PDF / DOCX

Built-in Pandoc pipeline — export to PDF / DOCX / HTML in one click.

The export pipeline

Kition exports through Pandoc — the industrial-grade Markdown converter that handles nearly any target format. Kition wraps it in a friendly dialog: pick a style, pick a target, hit Export.

All conversion happens locally — documents never leave your machine. That matters for legal, medical, financial, and any other sensitive workflow.

Steps

  • Command palette → "Export to PDF / DOCX / HTML"
  • Pick a style (default / academic / minimal / custom)
  • Pick a scope: current doc / current selection / all docs under a folder (merged)
  • Optional custom CSS (fonts, margins, header / footer)
  • Hit Export — defaults to ~/Downloads, override path as needed

Style customization

Drop custom CSS into Settings → Export to add a new style option in the dropdown. CSS supports full @page rules so you can control margins, paper size, headers, and footers.

Want a company template? Add a .docx reference file in Settings → Export → "DOCX template" — Pandoc will emit styles matching it.

@page {
  size: A4;
  margin: 2cm 2.5cm;
  @top-center { content: "Internal — Kition Engineering"; font-size: 9pt; color: #888; }
  @bottom-center { content: counter(page) " / " counter(pages); font-size: 9pt; }
}
body { font-family: "Inter", "PingFang SC", sans-serif; line-height: 1.6; }
h1 { page-break-before: always; }
code { font-family: "JetBrains Mono", monospace; font-size: 0.92em; }

Heads up

  • PDF export needs Pandoc installed locally — Kition checks on launch and links you to install if missing
  • For high-quality PDF (LaTeX path) you also need xelatex or lualatex
  • DOCX has no native callout type — they degrade to colored blockquotes
  • CJK PDF uses system fonts by default; embed via @font-face in CSS for portability
  • For huge docs (200+ pages), export per chapter and merge — faster and easier to debug

Troubleshooting

  • CJK shows as tofu boxes → font not installed; install Noto Sans CJK or pick another in CSS
  • Math overflows the page → inline math too wide, switch to block math or shrink the font
  • Images missing → relative paths broke after export; tick "Inline images as base64" in Settings → Export
  • Mermaid blocks not rendering → check the fence language tag (must be lowercase mermaid)

Related articles

Ready when you are.

Kition is a local-first AI workspace. Markdown documents, structured tables, and an AI agent — running on your own machine, against the model provider you choose.