Treat PDF export as a layout check, not just a file conversion. First make the Markdown render correctly; then inspect the downloaded PDF at its final page size. A correct live preview does not prove that a long table or code block fits a printed page.
Start with a small test document
Open Markdown to PDF, paste this fixture, and compare the preview with the exported file. The product currently advertises GitHub-flavored Markdown, Mermaid, math, and A4 or US Letter output; those are product descriptions, not a guarantee that every Markdown dialect will behave identically.
# Project handoff
## Before you begin
- Confirm the owner and deadline.
- Open the reference link: [CommonMark](https://commonmark.org/help/).
```text
A short code line that fits a page.
```
| Task | Owner |
| --- | --- |
| Review export | You |
Keep an unchanged copy of your source before experimenting. For sensitive material, use only a workflow whose data handling you have independently checked. This guide does not certify confidentiality or PDF accessibility.
Fix structure before appearance
- Use headings in order. One document title, then sections and subsections. A bold sentence is not a structural heading.
- Fence code blocks. Opening and closing triple backticks keep Markdown punctuation inside code from being interpreted as formatting. Shorten very long commands or explain their continuation syntax; arbitrary wrapping can change executable code.
- Check tables in the actual renderer. Tables are an extension, not part of the core CommonMark syntax reference. Use fewer columns, shorter labels, or a list when a table is too wide. Do not shrink an entire report to make one table fit.
- Resolve images. Check that each image appears before export. A local relative path can be meaningless in a browser editor; do not assume repository-relative images transfer automatically.
Choose the page size before the final pass
Choose the intended A4 or US Letter output first, then inspect line lengths. A layout that works on one page size can wrap differently on another. If the tool exposes margins or scale, adjust one setting at a time and re-export. Do not assume a raw HTML page-break tag will survive sanitization or be supported by every converter.
For developers controlling their own print CSS, break-inside: avoid requests that a box not be split. It is not a universal fix: browser fragmentation and oversized content still matter. This is a CSS technique, not a claim that the online editor exposes custom print styles.
Diagnose the exported file
- Code disappears off the right edge
- Split explanations from code, shorten long literals, or use a supported wrapping option. Check that copied commands still work.
- A table is clipped
- Reduce its columns or turn each row into a labeled list. Repeat the export and inspect the widest row.
- An image is missing
- Check the source and preview before blaming PDF output. Test with one simple supported image and avoid private authenticated URLs.
- A large blank space appears
- A block may be moving as a unit. Shorten it or divide it semantically; avoid inserting many blank lines as a layout hack.
Final delivery checklist
- Open the downloaded PDF in a second viewer, not only the editor preview.
- Inspect every page boundary, the widest table and the longest code line.
- Select and copy a sentence to check text extraction; this alone does not establish accessibility.
- Click important links and confirm images and mathematical symbols.
- Check page count, filename, and any recipient requirements before sending.
Sources and scope
Checked 24 October 2026. The workflow and troubleshooting recommendations are editorial guidance. No conversion benchmark or completed end-to-end export test is claimed.
- CommonMark quick reference — heading, link, image and fenced-code syntax.
- MDN: break-inside — fragmentation control and its values.
- Product homepage — current advertised formats and output options.