• Jul 15, 2026
  • 11 min read
Documentation team comparing Mermaid export formats with source editor, SVG vector output, and raster PNG PDF handoff options in Confluence

Exporting Mermaid Diagrams From Confluence: SVG, PNG, and PDF Tradeoffs

The compliance reviewer replied on Friday afternoon.

"Can you send the architecture diagram as a PDF attachment? The Confluence link is fine for the team, but our vendor packet needs a file."

The author opened the Mermaid macro, found export options, and clicked PDF. On a smaller test diagram, it worked. On the production architecture map — the one with four subgraphs and thirty-two services — the download failed in one browser and produced a cropped image in another.

That is the gap behind export Mermaid diagrams from Confluence workflows. The diagram renders on the page. The handoff format you promise stakeholders may not survive browser limits, Forge iframe permissions, canvas constraints, or diagram size.

"Which export button is the real source of truth?"


Quick Answer

  • Most reliable handoff: Mermaid source text and sanitized SVG.
  • Best-effort handoff: PNG, raster PDF, and clipboard image — validate on your largest real diagrams before you commit to them.
  • Separate path: Confluence whole-page PDF export is not the same as a macro's client-side PDF export.

BacklogBridge Diagram Lens for Confluence public docs describe this split explicitly. Other Mermaid macros may differ — verify export behavior in a sandbox trial.

Quick Decision Table

Stakeholder asks for…Export firstValidate on largest diagram?If it fails…
Editable diagram for engineeringMermaid sourceNo — text handoffProvide SVG as visual supplement
Slide or design review fileSanitized SVGLight check in target viewerSplit diagram scope; avoid untested PNG
Email/Slack imageClipboard or PNGYesUse SVG download; avoid browser screenshot
Vendor/compliance PDFMacro raster PDFYes — requiredHand off SVG + written note; do not substitute page PDF without comparison
Full Confluence page archiveConfluence page PDFYes — separate testDo not assume macro PDF matches page PDF

What You Are Trying To Accomplish

You want to share a Confluence Mermaid diagram with people who do not live in the page:

  • engineers who need editable source
  • reviewers who need a vector file for slides
  • procurement or compliance contacts who ask for PDF
  • chat threads where a pasted image is faster than a link

The outcome is a defined primary export format per audience, validated on real diagrams — not a last-minute click on whatever button works on a three-box test flowchart.

Requirements

RequirementWhy it matters
Approved Mermaid macro in Confluence CloudExport menus live in the macro; behavior varies by app
A real "large" diagram for testingRaster limits appear on production maps, not toy sketches
Known stakeholder formatPDF vs SVG vs source-in-repo changes the workflow
Browser matrix if raster exports matterForge Custom UI and clipboard APIs vary by browser
Admin approval for Marketplace macrosSite admins install through Connected Apps

Native Confluence vs Mermaid Macro Exports

Confluence pages can host Mermaid-like content through native features or third-party macros. Export options depend on the macro you installed.

A Forge macro with an export menu — such as Diagram Lens — generates files client-side from rendered output. Native page content may not offer the same Mermaid source download, SVG copy, or raster export paths. Confirm export behavior on the exact macro your space uses before documenting team handoff rules.

Step 1: Choose The Handoff Format By Audience

The Mermaid documentation describes diagrams as text and code. When the recipient can use text, Mermaid source is the most durable export because it survives re-rendering, diffs, and tooling changes.

Audience needStart withFall backAvoid assuming
Engineering / platform teamMermaid sourceSVGPNG as the canonical artifact
Design or slide reviewSanitized SVGTested PNGUntested clipboard paste
Vendor / compliance packetValidated PDF on largest diagramSVG + cover notePage PDF without checking macro output
Slack / email quick shareClipboard image after testPNG downloadScreenshot of browser zoom

Step 2: Export Mermaid Source

Source export is the handoff path documentation teams should default to for maintained architecture and process diagrams.

Why source wins:

  • Diff-friendly — reviewers see what changed between releases.
  • Re-renderable — recipients can render in IDE plugins, docs pipelines, or another approved macro.
  • Independent of canvas limits — no browser rasterization step.

Workflow:

  1. Open the macro editor or export menu from page view or wide view.
  2. Copy or download Mermaid source.
  3. Store in the ticket, repo, or attachment system your team uses for doc review.
  4. Include the Confluence page link as provenance, not as the only artifact.

Diagram Lens support docs treat source copy/download as a primary reliable path alongside SVG. Public product copy also surfaces line and character counts so authors can see when source is approaching size limits before render or export fails.

Step 3: Export Sanitized SVG

When stakeholders need a visual file but not editable source, Mermaid SVG export is the most reliable visual handoff from a Confluence macro — provided the macro sanitizes exported SVG the same way it renders on the page.

Why SVG over PNG:

  • Vector output scales in slides and print layouts.
  • Text remains selectable in many viewers.
  • Avoids the canvas dimension constraints that affect raster export.

Workflow:

  1. Confirm the diagram renders correctly in page view or wide view.
  2. Export or copy SVG from the macro export menu.
  3. Open the file in your target tool (slide deck, diagram viewer, ticket attachment).
  4. Compare labels and layout against on-page rendering.

Interactivity note: Macros with strict Mermaid security models — including Diagram Lens per public security page — sanitize SVG and strip click actions or JavaScript links. Exported SVG is meant for safe viewing, not interactive diagrams. If authors expected clickable nodes in the handoff file, set that expectation before export.

For a fuller macro security review, see Mermaid Macro Security in Confluence.

Step 4: Test PNG And Clipboard Image

Mermaid PNG export Confluence workflows are common — and commonly over-trusted.

PNG and clipboard image export typically rasterize the rendered diagram in the browser. That introduces variables:

  • Browser support for download and clipboard APIs
  • Forge iframe permissions — clipboard and file generation inside embedded Custom UI may be blocked by browser policy or enterprise controls
  • Canvas limits when very large diagrams exceed practical raster dimensions
  • Diagram size — node count, label length, and subgraph depth affect output size and memory use

Treat PNG and clipboard as best effort:

  1. Test on your largest production diagram, not a minimal example.
  2. Try more than one browser if your organization allows it.
  3. If PNG fails, export SVG first — Diagram Lens support troubleshooting recommends this order.
  4. Record which browser succeeded if your team standardizes on one.

Do not promise stakeholders a PNG workflow until that test passes.

Before You Rasterize: Viewport And Framing

Raster exports often capture the macro's current viewport — not an abstract "whole diagram" unless the macro fits to view first.

SituationRiskMitigation
Zoomed into one cluster in wide viewCropped PNG/PDFUse Fit or reset zoom before export
Long left-to-right architecture mapTiny labels in raster outputOpen wide view; fit to view; prefer SVG
Page column scalingBlurry raster textExport from macro menu, not a page screenshot

When diagrams routinely outgrow the page column, reader tools matter for inspection — but they do not replace export validation. See Mermaid Diagrams in Confluence: Why Big Diagrams Need a Reader.

Step 5: Test Raster PDF And Distinguish From Confluence Page PDF

Confluence diagram PDF export confuses two different pipelines:

Export pathWhat it capturesTypical use
Macro client-side PDFRasterized diagram from the macro's rendered outputAttachment for a single diagram
Confluence whole-page PDFConfluence page export layoutFull page or space documentation packet

Diagram Lens support known limitations state Confluence whole-page PDF export is separate from Diagram Lens client-side PDF export. They may not produce equivalent framing, resolution, or macro fidelity.

For raster PDF from the macro:

  1. Run the same large-diagram test you used for PNG.
  2. Confirm headers, labels, and subgraph boundaries are legible at 100% zoom in the PDF viewer.
  3. If PDF fails, hand off SVG with a short note rather than a cropped raster.

Worked example: Vendor packet asks for PDF

StepAction
1Identify the largest diagram in the packet scope
2Attempt macro PDF export in the browser your team standardizes on
3Open PDF at 100%; verify subgraph labels and edge text
4If pass → attach macro PDF; keep Confluence link as live source
5If fail → attach sanitized SVG; note that PDF raster export exceeded browser/macro limits
6Optionally compare Confluence page PDF — only if the packet requires full page context

Do not silently substitute a page screenshot when PDF export fails. That drops selectable text and may clip wide diagrams.

Export Format Comparison

FormatReliabilityStrengthsLimitations
Mermaid sourcePrimaryEditable, diffable, re-renderableRecipient must accept text
Sanitized SVGPrimaryScalable vector; aligns with strict macro renderingInteractivity stripped; not ideal for PDF-only non-technical reviewers
PNGBest effortUniversal image supportCanvas/browser limits; viewport framing
Clipboard imageBest effortFast paste into chatiframe + clipboard permission variance
Macro raster PDFBest effortSingle-file handoffSame raster limits as PNG; not page PDF
Confluence page PDFSeparate workflowFull page contextMay not match macro export fidelity

Common Pitfalls

PitfallBetter approach
Promising PDF before testing the largest diagramValidate raster paths on production-sized source
Using PNG as the engineering system of recordDefault to Mermaid source or SVG
Assuming page PDF equals macro PDFTest both if compliance requires PDF
Exporting while zoomed into one clusterFit to view or reset zoom before raster export
Skipping SVG when PNG failsFollow vendor troubleshooting: SVG first
Screenshot instead of exportScreenshots drop selectable text and may clip wide LR diagrams
Expecting clickable exported diagrams from strict macrosUse Confluence links for navigation; export static SVG

Admin And Security Notes

Atlassian's Manage your apps documentation says Confluence apps install from Marketplace through Connected Apps and require site admin access.

For export-heavy Mermaid workflows, admins and appsec reviewers should verify:

CheckWhy it matters for export
Export generated locally vs remoteRemote renderers add data-flow review
SVG sanitization on exportExport must match safe on-page rendering
Source-size limitsOversized source may block before export is available
Browser/iframe clipboard permissionsClipboard export may fail under strict policies

At the time of research on July 15, 2026, I did not find an official Atlassian Marketplace listing for BacklogBridge Diagram Lens for Confluence through available public sources in sibling editorial research. Search Marketplace again before install.

Do not infer SOC 2, ISO, Cloud Fortified, GDPR/DPA, or procurement approval without explicit published evidence.

Validation Checklist

Test with one diagram your team already uses for stakeholder handoff.

  1. Export Mermaid source; confirm it re-renders in your approved toolchain.
  2. Export SVG; compare labels against page view at normal zoom.
  3. Open wide view; fit to view; export PNG on the largest diagram; note browser and outcome.
  4. Repeat PNG or PDF in a second browser if policy allows.
  5. Copy clipboard image into the target channel; confirm clarity.
  6. Export macro PDF; open at 100% and check legibility.
  7. Optionally export Confluence page PDF; compare framing to macro PDF.
  8. Record failures and fall back to SVG or source — do not silently substitute screenshots.

When To Use A Different Approach

  • Canvas-first diagrams where PNG from a visual editor is the norm — see Mermaid vs draw.io and Gliffy in Confluence.
  • Large diagrams that fail raster export — split the map or hand off SVG/source; see Architecture Diagrams in Confluence.
  • Repository-backed diagram sync — Diagram Lens public pages state it does not include repository sync; choose a different tool category if Git is the system of record.

Final Recommendation

Teams export Mermaid diagrams from Confluence reliably when they treat Mermaid source and sanitized SVG as primary handoff paths and PNG, raster PDF, and clipboard image as best-effort conveniences validated on real diagrams.

Define the format by audience, fit the viewport before rasterizing, test in more than one browser when exports matter, and keep Confluence page PDF separate from macro client-side PDF. If your macro is Diagram Lens, public support docs align with that hierarchy — but your process should still rest on sandbox tests with your largest diagrams and browsers, not this article.

For authoring discipline that makes exports more useful, see Architecture Diagrams in Confluence: Keeping Mermaid Source Reviewable and Backlog Bridge's Mermaid chart tips guide.