Skip to content

PDF export

Giorgio Garofalo edited this page Mar 18, 2025 · 6 revisions

When running Quarkdown's compiler via quarkdown c, specifying the --pdf flag generates a PDF file.

  • The content of the PDF matches 1:1 with what the HTML output would render in the Chrome browser.
  • All document types and features supported by the HTML target are also supported.

Requirements

In order to generate PDF files from HTML, the following dependencies are required:

  • Node.js
  • npm (usually bundled with Node.js)

The PDF generation is handled by Puppeteer. If not installed, Quarkdown will automatically install the latest version via npm on the first run.

Additional options

  • --node-path <path>: sets the path to the Node.js executable. Defaults to node.

  • --npm-path <path>: sets the path to the npm executable. Defaults to npm.

  • --pdf-no-sandbox: disables Chrome sandbox during PDF generation. This is potentially unsafe and should be used only when strictly needed.

Exporting manually (legacy way)

An HTML artifact can be exported to PDF via the in-browser print feature (CTRL/CMD + P).

While paged (and plain) documents are print-ready, you'll need a few additional steps to save your slides document as PDF.
Please refer to Reveal's instructions to learn how to do so.

Clone this wiki locally