---
title: Export to Word / PDF (Markdown → .docx / .pdf)
---

# Export to Word / PDF (Markdown → .docx / .pdf)

## What it is

Turn any Markdown in Omniscio into a **Word document (.docx)** or a
**PDF** saved to your computer — from one consolidated **Export…** menu that also
holds Omniscio's existing online-publish actions.

## Where to find it

### Where the Export… menu appears

- **Chat messages** — an agent message's `⋯` ("Message actions") menu groups
  **Export to Word**, **Export to PDF**, and **Export to Google Docs** under an
  **Export** submenu (the Copy actions stay at the top level).
- **Markdown file previews** (the in-app file peek for a `.md` / `.markdown` file)
  — the toolbar's **Export…** button.
- **Project docs** (the sidebar Auto Context list) — the doc's right-click menu.
- **Scratchpads** — the editor header's **Export…** button.
- **File links in chat** — right-click a `.md` file link; **Word**, **PDF**, and
  (when enabled) **Google Docs** sit inside an **Export ▸** submenu, with **Copy
  path** and **Share as public artifact** staying at the top level.
- **Whole conversations** — the session `⋯` → **Exports** submenu now has
  **Export to Word** and **Export to PDF** next to **Download** (`.md`) and
  **Copy as Markdown**. These export the same visible-only transcript the
  Markdown download uses (operator + Claude prose; tool-call lines and system
  rows stripped; aside branches excluded).

## How it behaves

### What you can do

Anywhere Omniscio shows Markdown you can write out, an **Export…** control offers up to
four destinations:

- **Export to Word** — saves a `.docx` to a location you pick.
- **Export to PDF** — saves a `.pdf` that looks the way Omniscio renders the Markdown
  (headings, lists, tables, fenced + syntax-highlighted code, blockquotes).
- **Publish online** — the existing Omniscio Shares link (a public, unguessable URL).
  Only appears on surfaces that already had online publishing.
- **Export to Google Docs** — the existing Google Docs export. Only appears when
  **Settings → Google Workspace → Google Docs export** is on.

Word and PDF export are **always available** — they're free, local actions with
no account, no cost, and no setting to flip (just like the session "Download as
Markdown"). The native Save dialog is your confirmation: you choose where the
file lands.

### v1 scope (deliberate)

- Code blocks are styled and **syntax-highlighted**, but page headers/footers,
  a table of contents, and font/theme choices are not offered yet.
- Online (`http`/`https`) and `data:` images render; local or `attachment://`
  images degrade to their alt text.
- One export at a time; a very large document may take a moment.

## For agents

### Standalone command — export any file from disk

A **Quick Launch → Export File** tab lets you pick **any** `.md` / `.markdown`
file on your computer and save it as Word or PDF without opening it in Omniscio first.
It isn't pinned to the Quick Launch strip by default — add it via
**Settings → Quick Launch tabs** (it appears in the "available to add" list).

### How it works (under the hood)

Every surface produces the **same** styled document, because they all flow
through one pipeline:

1. The Markdown is rendered to a single **sanitized HTML** intermediate (the same
   audited `marked` + syntax-highlight + `sanitize-html` pipeline Omniscio uses for
   share links). Untrusted Markdown is sanitized — scripts, inline event
   handlers, and non-`http`/`https`/`data` image sources are stripped.
2. **PDF** is produced by Electron's own print engine (`printToPDF`) on a hidden,
   sandboxed window — so the PDF matches Omniscio's rendering with no extra software.
3. **Word** is produced from that same HTML by a pure-JavaScript `.docx`
   generator (`@turbodocx/html-to-docx`).

All conversion happens in Omniscio's main process; the heavy document libraries never
load into the browser-like UI layer. Only one export runs at a time.

### CLI access

**Export to a file works on the desktop AND the mobile web client — but is not a CLI action.** On the desktop, Word/PDF write through a native OS Save dialog. On a **phone** (the mobile web client) there's no Save dialog, so a whole-conversation export instead fetches the file **bytes** and downloads/shares them in the phone browser (see [copy-session-as-markdown.md](copy-session-as-markdown.md) → "On the mobile web client"). What still can't produce a file is the **CLI control server** (`127.0.0.1:19519`): an external script or an AI driving Omniscio headlessly can fetch a session's Markdown via the read-only `GET /session/:id/markdown` endpoint (the same assembler the Word/PDF export reuses), but cannot generate the `.docx` / `.pdf` — that's a deliberate `deferred-no-route` gap a future CLI route could close.

## Related

- **Omniscio Shares** — the "Publish online" action's public-link system.
- **Export to Google Docs** — the Google Workspace export the menu also folds in.
- **Copy session as Markdown** — the session transcript assembler that the
  whole-conversation Word/PDF export reuses.
