# Printing and export

Turning a WerkOS item into a PDF, a printed page, a Word file or a CSV that holds the item and nothing of the interface around it.

* Kind: pattern
* Page: https://design.werklist.com/patterns/printing
* Version: 2.1.2

## When to use it

* Download as PDF on a document, a spreadsheet, a knowledge base article or a map.
* Printing an email conversation.
* Export CSV on a board or an audit log, and Import CSV on a board.

## When not to use it

* Printing a document through the browser's print dialog: the browser adds its own date, address and margins.
* A dark surface on paper.
* A PDF laid out differently from the printed page of the same item.

## Rules

* A PDF has the layout the editor shows, so the pages seen before export are the pages of the file.
* Paper is white in both themes.
* Nothing of the interface prints: no menus, buttons, header or theme.
* A printed email leaves out images loaded from the web.
* List items may break across sheets. Tables, quotes and code blocks move to the next sheet whole.
* CSV export follows the view: its filter, sort, hidden columns and order, with the item name first.
* CSV import shows a preview before it writes, lists headers that match no column and cells that break their column's rules, and writes nothing invalid.
* A long export runs in the background and appears under your exports when it is ready.
* A PDF that cannot be built is an error, not a partial document.

## Anatomy

* Sheet: A4, 794 by 1123 px at 96 dpi; sheets 26 px apart on screen, touching in the PDF
* Margin: 72 px (19 mm) on each side
* Running head: the product name, a vertical bar and the document name; 11 px, 30 px from the top, across the text column
* Page number: 30 px from the bottom, at the right edge of the text column, when the export asks for it
* Body: Satoshi 15 px on a line of 1.7; headings at 1.7, 1.35 and 1.12 em (--font-sans)
* Ink and paper: near black ink on white, the same in both themes

## States

* Ready: The entry names the result
* Nothing to export: The entry says why: This board has no rows to export. (--text-muted)
* Building: The primary button reads Exporting, busy and disabled (--brand-true)
* Queued: Export queued. It will appear under your exports when ready.
* Done: Downloaded
* Failed: One sentence and Try again, and no partial file (--error-ink)

## Keyboard

* Enter or Space on an export entry: Starts the export or opens its options dialog
* Escape: Closes the export dialog without exporting

## Accessibility

* The export button is marked busy while the file builds and keeps its name.
* A finished download is announced once.
* Printed pages carry the language of the document, so a PDF reader voices it correctly.

## Content

* Entries name the result: Download as PDF, Download as Word, Print conversation, Export CSV, Export PDF.
* Export dialog: Page numbers, Bottom right or None.

## Tokens

* --font-sans
* --brand-true
* --error-ink
* --text-muted
