listpress
v1.1.0
Published
Turn a Markdown checklist into a polished, print-ready HTML or PDF document.
Readme
ListPress
Turn a Markdown checklist into a polished, print-ready HTML or PDF document.
ListPress supports Letter and A4 paper, configurable margins and column counts, duplex binding, typographic themes, SVG icons, and forced column or page breaks.
By default, ListPress generates a self-contained HTML file with stylesheets, scripts, and icons embedded, so it can be opened offline in a browser to print or export as a PDF. A live preview can optionally build the rendered checklist in a browser as the Markdown is changed.
ListPress can also generate a PDF directly using Playwright.
Example

You can build this example with:
npx listpress examples/camping.mdQuick Start
Create a Markdown checklist, then run:
npx listpress your-checklist.mdListPress writes your-checklist.html next to the Markdown file. Open the HTML in a browser and use the browser's print dialog to print it or save it as a PDF.
Command-Line Options
| Option | Description |
| --- | --- |
| -o, --output <file> | Choose the output file. The output directory must already exist. |
| --pdf | Export a PDF using Playwright’s headless Chromium. |
| -w, --watch | Rebuild the HTML and start a local live-preview server whenever the Markdown changes. |
Use -o or --output to choose a filename or location:
npx listpress your-checklist.md --output exports/another-checklist.htmlUse --pdf to write your-checklist.pdf alongside the Markdown file. Use -o to choose a different PDF path. If Playwright’s headless Chromium is missing, ListPress downloads it on the first PDF export. That first download requires internet access.
npx listpress your-checklist.md --pdfUse -w or --watch while editing:
npx listpress your-checklist.md --watchWatch mode runs a local server that displays a real-time preview of the Markdown file in a browser. It also writes the generated HTML alongside the Markdown file. Press Ctrl+C to stop watching. Watch mode cannot be used with PDF generation.
Document Settings
Place YAML frontmatter at the top of the checklist to set its layout.
---
columns: 2
duplex: false
margins: 0.5in
paper: letter
theme: theme1
---| Setting | Values | Default |
| --- | --- | --- |
| columns | Unquoted integer from 1 to 3 | 3 |
| duplex | true or false; swaps left and right margins on left-facing pages | false |
| margins | One to four lengths: a number with in, cm, or mm | 0.5in on all sides |
| paper | letter or a4 | letter |
| theme | theme1, theme2, theme3, or theme4 | theme1 |
Margins use the same shorthand order as CSS:
- One value applies to all sides.
- Two values set top/bottom and left/right.
- Three values set top, left/right, and bottom.
- Four values set top, right, bottom, and left.
For example, margins: 12mm 12mm 12mm 20mm reserves a 20 mm left binding margin.
When duplex: true, ListPress moves that margin to the right on left-facing pages.
Themes
| Theme | Heading font | Body font |
| --- | --- | --- |
| theme1 | System sans-serif | System sans-serif |
| theme2 | System serif | System serif |
| theme3 | System serif | System sans-serif |
| theme4 | System sans-serif | System serif |
Themes use local system fonts, so the generated HTML remains usable offline.
Markdown Checklist Syntax
- Use
#for the sheet title. - Use
##for section headings within the columns. - Use
- [ ]for an unchecked item and- [x]for a checked item. - Ordered and nested task lists are supported.
- Put
:::column-break:::or:::page-break:::on a line of its own with a blank line on each side to force a break. A column break advances to a new page when no columns remain.
Wrap a break marker in an HTML comment to keep ordinary Markdown previews clean:
<!-- :::column-break::: -->Add an icon with {{icon:name}} for a Lucide icon or {{icon:library:name}} for another icon set in the Iconify Catalog.
## {{icon:shirt}} Clothing
- [ ] {{icon:mdi:alert-circle-outline}} Rain jacketIcons are downloaded while building the HTML and embedded for offline use.
Printing
- For the best result, disable headers and footers in the browser print dialog.
- ListPress controls page margins with the
marginsfrontmatter setting. Set the browser print margins to default or minimum to avoid adding extra space.
Development
ListPress requires Node.js 24 or newer.
pnpm install
pnpm exec playwright install chromium
pnpm testRun pnpm test to run both Vitest projects. Use pnpm test:node for Markdown rendering, embedded assets, and CLI behavior. Use pnpm test:browser for browser layout, offline HTML, checkbox interaction, printing, pagination fallback, and live preview. The browser project uses Playwright to drive Chromium.
Run pnpm test:coverage to test both suites and report Node.js coverage.
Linting and formatting use Vite+, so Node.js 24.11 or newer is required for those commands:
pnpm lint
pnpm format:check
pnpm format