Convert Markdown to PDF without losing the document
Markdown is written for a screen that scrolls. A PDF has pages, and pages have edges. Most converters ignore that difference: they hand the file to a browser, press print, and send back whatever falls out. That is why a table loses its last four columns, why a heading ends up stranded at the foot of a page, and why the logo at the top of a README arrives as a line of raw HTML printed as text. This one lays the document out for paper first, and then tells you what it had to do to get there.
Tables that still fit the paper
A Markdown table carries no column widths. The syntax has nowhere to put them, so a converter that passes the table straight to a browser is hoping it happens to fit. Every table here is measured before it is drawn and sized to the paper you picked. A table of file paths fourteen columns wide still lands inside the margins, with long values wrapping rather than running off the edge, and the result says that it had to go that far.
The quieter half of the problem happens on page two. A long table usually leaves its header row behind on page one, so the reader gets a grid of unlabelled numbers. Here the header repeats on every page the table reaches, and a row is never cut in half by a page break.
Code that survives the margin
Fenced code keeps its highlighting and its language label. Long lines wrap so that you can see they wrapped, instead of being clipped where the paper ends. A PDF has no scrollbar, so a line that does not wrap is a line with its right-hand side missing. Indented blocks, fences with no language on them, and inline code all come through as what they are.
The pictures in your README
A logo and a row of build badges are almost never written in Markdown. There is no way to centre a picture in it, so README files reach for raw HTML instead. A converter that refuses to render HTML usually escapes it rather than dropping it, which means the document opens with a screenful of image tags printed as text. Here the markup is stripped and the pictures and the words inside it are kept, so the top of the document looks like the top of the document.
Images are fetched and embedded in the file rather than linked to, so the PDF still works offline and still works in a year. If one cannot be fetched, the result counts it and says so instead of quietly leaving a gap where a picture should be.
Your headings become the navigation
Every PDF carries a bookmark tree built from your own headings, so a long document can be moved through from the sidebar instead of scrolled. Ask for a contents page and you get a clickable one as well, at whatever heading depth you choose. A single heading at the very top is read as the title of the document and left off the list, the way a title behaves in a book rather than a chapter.
Footnotes stay footnotes, with a raised marker and a link back to the line you were reading. Task lists keep their boxes, ticked and unticked. Note, warning and tip callouts keep their colour bar. Front matter at the top of the file is treated as metadata and stays off the page. Definition lists, strikethrough, nested quotes and three levels of nested list all render as themselves.
It tells you what it could not do
Every conversion comes back with a short account of itself: how many pages, which direction the text runs, how many tables, how many code blocks, how many images were embedded and how many could not be fetched. If a font was missing a character, it lists the character. If you asked for a contents page and the document has no headings to put in it, it says so rather than handing you a file with a blank page at the front. A converter that hides its own failures is the reason people stop trusting converters.
Scripts that are not Latin
Fonts travel inside the PDF, so a document opens the same way on a machine that has none of them installed. Right-to-left text is judged block by block rather than once for the whole file, which matters because a technical document in that kind of script is often half Latin by character count, full of file paths and class names, and still reads right to left. Fenced code is kept out of that decision and always set left to right, and the rest of the layout mirrors properly: bullets, quote bars and table columns all move. Where a script has no italic, emphasis is set as weight rather than by slanting letters that were never drawn to slant.
What it will not do
LaTeX is not rendered. A block between dollar signs prints as the text it is. Mermaid is not drawn either: a fence marked mermaid comes out as a code block with a label on it. Chinese, Japanese and Korean fall outside the fonts the tool carries, so characters in those scripts are reported as missing rather than guessed at. These are limits rather than defects, and they are written down here so that nobody discovers them after uploading.
The practical part
Upload from your device, from Google Drive, or by pasting a link to a file. Markdown files are accepted under any of their usual extensions, and so is plain text. Paper can be A3, A4, A5, Letter, Legal or Tabloid, portrait or landscape, with narrow, normal or wide margins. Page numbers and syntax highlighting are on unless you turn them off. Send one file and a PDF comes back; send several and they arrive as a ZIP, or as one merged PDF with continuous page numbering if you ask for that. The text stays real text, so it can be selected, searched and copied out, rather than flattened into a picture of words.
What you get
- Tables that stay inside the margins, with the header row repeated on every page they reach
- Syntax-highlighted code with wrapped long lines instead of clipped ones
- Images embedded in the file, including the ones written in raw HTML
- A bookmark tree from your headings, and a clickable contents page when you want one
- Fonts carried inside the PDF, so the file looks the same on every machine that opens it
- A written account of anything the converter could not do, including missing glyphs and images
What's next?
Working from a Word file instead? Word to PDF takes the same route to paper. Put the result together with the rest of a report using Merge PDF. Then bring the file size down before you send it with Compress PDF.