Skip to main content

PDF Export

The problem

You need a .it document as a PDF — for email, print, archive, or legal filing.

The solution

intenttext document.it --pdf --theme corporate

This renders the document to PDF using the print renderer with full layout support: page size, fonts, headers, footers, watermarks, and signature lines.

Basic export

# Default theme
intenttext document.it --pdf

# With a specific theme
intenttext document.it --pdf --theme legal

# Template merge to PDF
intenttext template.it --data data.json --pdf --theme corporate

Theme selection

Choose a theme that matches the document type:

ThemeBest for
corporateBusiness documents, reports, proposals
legalContracts, agreements, compliance docs
minimalClean, simple documents
printMaximum readability on paper
editorialNewsletters, articles
warmFriendly communications, HR docs
technicalSpecs, runbooks, architecture docs
darkScreen reading (not great for print)
intenttext report.it --pdf --theme corporate
intenttext contract.it --pdf --theme legal
intenttext newsletter.it --pdf --theme editorial

PDF metadata

The PDF inherits metadata from the .it file:

.it blockPDF metadata
title:PDF Title
summary:PDF Subject
meta: | author: namePDF Author
meta: | domain: categoryPDF Keywords

Control the PDF layout from inside the .it file:

page: | size: A4 | margins: 2.54cm
font: | body: Inter | heading: Inter | size: 11pt
header: Company Name | align: left | size: 8pt
footer: Page {page} of {pages} | align: center | size: 8pt
watermark: CONFIDENTIAL | opacity: 0.05

These keywords only affect print/PDF output. They're ignored in standard HTML rendering.

Prerequisites

PDF generation requires Puppeteer:

npm install puppeteer

Puppeteer uses a headless Chromium instance to convert the print HTML to PDF. It's a dev dependency — not needed for parsing, rendering to HTML, or any other operation.

Batch export

Export multiple documents:

# Export all contracts
for f in contracts/*.it; do
intenttext "$f" --pdf --theme legal
done

# Export all with a template
for f in invoices/*.it; do
intenttext "$f" --data clients.json --pdf --theme corporate
done

Next steps