Skip to content

The same report in PDF

recit export --to pdf prints the report from the same build as the web page, through the one print chain of Récit (@recit/paged). The printable view of a report adds what paper needs:

  • a title page with the title, the description, the author and the date;
  • the table of contents in links (page numbers come later, with Paged.js);
  • the sections in order, figures and key figures never cut across two pages;
  • the header row of a long table repeated on every page it spans;
  • bookmarks from the section titles, and a tagged PDF.
TerminalBash
npx recit export --to pdf examples/report-quarterly/quarterly.story.md

The page box comes from the pdf: settings of the report, or from the report: section of recit.config (A4 with 20 mm margins by default):

YAMLYAML
pdf: page: size: Letter tables: repeatHeader: true

Each PDF is listed in the exports.json next to it, with its size, its pages and its checksum. The PDFs are produced in CI, never on the hosting platform.