Export
On this page
Turn the open note into a Word document or a PDF.
- Open the note's "…" menu and pick Export as Word or Export as PDF.
- Or run "Export note as Word" or "Export note as PDF" from the command palette.
- The file is named after the note.
- Properties (frontmatter) are left out.
- The note itself is never changed.
Word
You get a real .docx file, built from the note's Markdown.
- Headings become Word headings, so Word's outline and table of contents work.
- Bold, italic, strikethrough, inline code, highlights and web links are kept.
- Links to other notes become plain text.
- Lists are real Word lists, nested and numbered. A numbered list starts at the number you wrote.
- Tasks show a ☐ or ☑ box.
- Quotes get a line down the side. Callouts are a shaded box with the title in bold.
- Code blocks are monospace on light shading.
- Tables keep their header row and column alignment.
- Images from your vault are put inside the file and scaled to fit the page. A missing image is skipped.
- The look is plain on purpose: Calibri, 11 point, black text. Restyle it in Word.
Components become the plainest thing that says the same:
| Component | In Word |
|---|---|
| Chart | A table of its data with a caption |
| Progress bar | Text, like "Chapters written: 7 of 12" |
| Tabs | Each tab's name in bold, then what it holds |
| Button | A link |
| Form | Its title and a list of its fields |
| Table of contents | Left out. Word can make its own |
Math and diagrams are exported as their source text.
- In a browser and on phones, Hatch opens the print dialog. Choose "Save as PDF" as the printer.
- In the desktop app, Hatch asks where to save and writes the PDF itself.
- The page is always light, whatever theme you use.
- It fits A4 and Letter.
- Headings stay with the text under them. Tables, code blocks and images aren't split across pages when they fit on one.
- Charts, math and diagrams are drawn as they are on a published site. Every tab is shown, one under the other.
- Images from your vault are included. Hatch waits for them to load before printing.
- In the desktop app, a note that takes more than 30 seconds to turn into a PDF (a picture on a server that doesn't answer) opens the print dialog instead.
For developers
packages/app/src/export/docx.tsmaps the Markdown tree to a document with thedocxlibrary. The library loads only when someone exports.packages/app/src/export/pdf.tsrenders the note with the publish renderer into one HTML page with its own print styles.packages/app/src/export/index.tsreads images and collections from the vault and saves the result.- On desktop,
htmlToPdfinapps/desktop/main/main.tsprints the page in a hidden window. It gives up after 30 seconds and rejects, and the app falls back to the print dialog. - Saving goes through
platform.saveFileandplatform.savePdfwhen the shell has them (desktop). Otherwise it's a browser download and the print dialog.