Troubleshooting your PDF

Something not looking right? Find the problem below for the cause and the fix. To see what each feature should look like, click Sample for a test page. It replaces what's in the editor, but Undo, in the note that appears above it, brings your document back.

Markdown
Preview

The formatting disappeared when I pasted

The editor works with Markdown, which is plain text. Formatted text copied from a web page becomes Markdown as you paste it. From most other apps only the characters come through, not their look: bold, headings and tables survive only if the text you copied was already Markdown, with its **, # and | symbols.

Lines run together

In Markdown, a single line break doesn't start a new line. Lines typed one under another join up into one paragraph, so that text wrapped at a fixed width in an email or a code editor reflows neatly in the PDF. To start a new paragraph, leave a blank line. To start a new line without a gap, such as in an address or a poem, end the line with a backslash:

Threepenny Labs LLC\
123 Main Street\
Springfield

Two spaces at the end of a line do the same, but they're invisible and easy to lose when you edit, so the backslash is the safer choice.

Symbols like ** and # show in the PDF

When Markdown's symbols are printed instead of doing their job, a small detail usually stops them being recognized:

Math shows as code or plain text

Formulas are drawn when they're between math delimiters: $…$ or \(…\) inside a sentence, and $$…$$ or \[…\] on lines of their own. Formulas are shown as code when they're inside backticks or in a code block, including a block marked ```latex, which is how Claude documents copy equations. Replace the backticks with $ or $$. GitHub's two forms are the exception: a block marked ```math and $`…`$ inside a sentence are drawn as formulas.

A formula that stays as text with its dollar signs showing usually has a space just inside them: $x$ works and $ x $ doesn't. A formula shown in red has a LaTeX error, most often a missing }. The math guide lists the other causes.

Tables don't show, or split across pages

A table that appears as lines of text full of pipes is almost always missing the row of dashes under the header, or has fewer dashed cells than header cells. The tables guide has the full list of causes.

A table longer than the space left on a page carries on onto the next page. md2pdf.me breaks it between rows, never through one, and in Chrome and Edge it repeats the header row at the top of the new page. To keep a short table on one page, put a page break before it, or wrap it so it moves to the next page whole if it doesn't fit, with a blank line inside each tag:

<div style="break-inside: avoid">

| Item | Price |
|---|--:|
| Tea | $3.50 |

</div>

A table that's too wide for the page has its text wrapped inside the cells, and if it still doesn't fit, it's shrunk to the page's width. The tables guide has tips for wide tables, and a landscape page gives a wide table more room.

Images don't load

md2pdf.me runs entirely in your browser and can't see the files on your computer, so an image can only be shown if it's on the web. That's the cause of most missing images:

If an image loads but is too big, set its width with a line of HTML instead of the Markdown: <img src="https://…" alt="Chart" width="300">. An image that shows in the preview is included in the PDF.

A diagram shows as code

Mermaid diagrams are drawn only when the code block starts with three backticks followed directly by mermaid, on the same line. If the word is on a line of its own above the backticks, move it up. If the diagram has an error, the code stays visible with the error above it in red. The Mermaid to PDF page has working examples of each diagram type.

The date, a web address or a blank page is printed

My document disappeared

Clicking Clear, Sample or a Try it button, or opening a file, replaces your document. Until you type or leave the page, the note above the editor offers Undo (or press ⌘Z or Ctrl+Z). After Sample or Try it, reloading the page before you type also brings it back, unless it was too big to keep. Clear deletes the saved copy at once, so after Clear only Undo or ⌘Z brings it back.

Your document is kept only in this browser, on this device, so it's still there when you come back. It's lost if you clear your browsing data or work in a private window, which forgets everything when it's closed. Another browser or device has its own, separate copy. Nothing is ever stored on our servers, so we can't recover it: for anything you'll need again, keep the Markdown in a file of your own.

The browser keeps about 5 MB for the site, so a bigger document, usually from pictures written into it, can't be kept. While it's too big, the label above the editor says Too big for this browser to keep, and a reload brings back the last document that fit, or the sample. Use fewer or smaller pictures, or put them online and add their addresses to the text instead. Either way, keep the Markdown in a file of your own.

Other how-to guides

Back to the Markdown guide