Skip to content
Limited Time 40% off for early adopters — Get discount →

Print Diagrams

Last updated:

Mermaid Studio lets you print diagrams directly from the IDE with full control over page setup, margins, and scaling. You can also save diagrams as PDF files using your system’s print-to-PDF feature.

  1. Open your Mermaid file in the editor or, in the case of a markdown file, pop out the diagram you want to print into its own preview window.

  2. Use one of these methods:

    • Press Command + Option + P Control + Alt + P
    • Search for Print Diagram in the Search Anywhere dialog ( Shift + Shift Shift + Shift )

    Search Anywhere showing Print Diagram

  3. Configure print options in the dialog. A live preview shows how your diagram will appear on the page.

    Print options dialog

  4. Click OK to open the system print dialog.

  5. Select your printer and click Print.

Use neutral theme: Renders the diagram using Mermaid’s neutral theme, which uses grayscale-friendly colors. Recommended for black and white printers or to reduce ink usage.

Paper Size: Choose from standard sizes or create custom ones.

SizeDimensions
Letter8.5” × 11”
Legal8.5” × 14”
Tabloid11” × 17”
A4210 × 297mm
A3297 × 420mm
A2420 × 594mm
A1594 × 841mm

Orientation: Portrait (taller than wide) or Landscape (wider than tall).

To add a custom paper size:

  1. Click the paper size dropdown and select Manage custom sizes…

    Manage custom sizes

  2. In the Custom Sizes dialog, click the + button to add a new size.

    Custom sizes dialog

  3. Enter a name, choose units (mm or inches), and specify dimensions.

    Add custom size dialog

  4. Click OK to save.

Custom sizes appear in the paper size dropdown alongside the built-in sizes.

Configure the space between your diagram and the edge of the paper.

  • Unit: Choose millimeters (mm) or inches (in)
  • Top/Bottom: Vertical spacing
  • Left/Right: Horizontal spacing
  • Link checkboxes: When enabled, changing one margin adjusts its partner proportionally

Default margins are 1 inch (25.4mm) on all sides.

Fit content (default) : Prints the diagram at its natural size. If the diagram is larger than the printable area, it scales down to fit.

Fill page : Scales the diagram to fill the entire printable area.

Use your operating system’s print-to-PDF feature:

macOS: In the system print dialog, click the PDF dropdown and select Save as PDF…

Windows: Select Microsoft Print to PDF as the printer.

Linux: Select Print to File as the printer and choose PDF format (when using CUPS-PDF).