Skip to content
Margo v0.0.5

PDF documents

#

Margo's PDF path reuses the rendered HTML representation and sends it through an explicitly selected installed engine. The result is a PDF artifact, not a second Markdown implementation.

CLI

sh
margo pdf guide.md \
  --output guide.pdf \
  --page-size A4 \
  --orientation portrait

The default engine mode is auto. Margo can discover an installed Chromium family executable, but it does not download a browser. Use margo doctor when you need to see the candidate and capability report.

Page geometry

Page size, orientation, and each physical margin are independently configurable:

yaml
margo:
  page:
    size: Letter
    orientation: landscape
    margins:
      top: 12
      right: 0
      bottom: 12
      left: 0

An explicit CLI flag wins over a document preference. A margin of 0 requests full bleed on that edge.

Editorial furniture

Pre-rendered PDFs carry the document identity into the exported artifact. Margo adds the configured logo and site name to the header, then places the document title and Generated by Margo in the footer. The furniture is part of the engine-neutral HTML projection, so it remains available without the interactive Goshtoso site shell.

PDF output defaults to stripping relative link targets while retaining visible text. Choose --relative-links resolve --base-url URL when a resolved public base is part of the export contract.