Printing Markdown source usually produces a page full of # headings, pipe characters, and code fences. To print a Markdown file as a readable document, render it first, inspect the output, and then use either your browser's print dialog or a dedicated PDF export.
With mdview.io, you can render the document in your browser and print the formatted result. Its export tools also create a PDF from the rendered document, including supported tables, fenced code, Mermaid diagrams, and LaTeX math.
Ctrl+P on Windows and Linux or Command+P on macOS.The important step is printing the rendered view rather than opening the .md file in a plain-text editor. A browser can then preserve the document hierarchy, table formatting, code styling, and diagrams.
There are two practical routes.
Open the print dialog, select Save as PDF as the destination, and choose the paper size, orientation, margins, and scale. This is convenient for a quick PDF and gives you direct control over browser print settings.
Before saving, inspect every page in the preview. Disable browser headers and footers if you do not want the URL, date, and page title added around the document.
Choose Export PDF from the document menu to download a PDF created from the rendered content. mdview.io prepares wide tables for the page layout and calculates page cuts to reduce awkward splits. Free exports include mdview.io branding and have a page limit; Pro removes the watermark and page limit.
For automated reports or CI, saved documents can also be verified and exported through the mdview.io CLI or API. That workflow is useful when a build should fail because a Mermaid diagram does not render, rather than silently producing an incomplete PDF.
A valid Markdown file is not automatically a good printable document. Review the rendered result, not only the source.
| Content | What to check in the PDF preview |
|---|---|
| Mermaid diagrams | Every diagram rendered; labels are legible; no diagram is clipped |
| Wide tables | Columns remain understandable; long URLs and code wrap acceptably |
| Code blocks | Indentation is preserved and important lines are not cut off |
| Images | Remote images finished loading and remain sharp enough to print |
| Links | Link text is meaningful when the URL is not visible on paper |
| Math | Symbols and equation layout rendered before export |
Mermaid needs special attention because raw diagram syntax can look plausible while still containing a parse error. Fix any failed diagram before producing the final file. For a large architecture diagram, landscape orientation may be more readable than shrinking it to fit a portrait page.
Wide tables and long code lines create a similar tradeoff. Wrapping makes them fit but can reduce readability; landscape orientation keeps more horizontal space but gives each page less vertical room. If one section is unusually wide, consider simplifying it instead of scaling the entire document down.
Markdown does not have a portable, standard page-break instruction. Page boundaries are normally determined by the browser or PDF renderer after fonts, images, tables, and diagrams have been laid out.
For more predictable output:
Some Markdown processors accept raw HTML and custom print CSS for forced page breaks, but that technique is renderer-specific. Use it only when you control the complete publishing pipeline; it may be ignored or sanitized elsewhere.
Before sending the PDF, verify:
If the document will be printed on paper, print one representative page before producing many copies. Screen contrast, background colors, and fine diagram lines can behave differently on a physical printer.
Opening a local file or pasting Markdown into mdview.io renders it in your browser. The content is not uploaded merely to preview or print it. It leaves the device only when you deliberately use a server-backed feature, such as saving or sharing a document, or another feature that states it processes the content on the server.
For confidential material, avoid creating a share link, review externally hosted images before loading them, and check where the browser saves the exported PDF. The PDF is a new copy of the document, so apply the same storage, access, and deletion rules you use for the original file.
The reliable workflow is simple: render, inspect, preview the pages, and only then print or export. That sequence catches broken Mermaid blocks, collapsed tables, clipped code, and poor page breaks before they become part of the final PDF.
Use browser printing when you want a physical copy or need manual paper controls. Use Export PDF when you want a downloadable document prepared from mdview.io's rendered layout.