How to Save an AI Answer as a PDF (Tables, Math and Diagrams Intact)
ChatGPT and Claude answer in Markdown, so pasting a reply into Word turns tables into pipe characters and diagrams into gibberish. Render it properly first, then save a clean PDF — in your browser, with nothing uploaded.
Updated September 9, 2026
Why pasting an AI answer into Word turns to mush
You asked ChatGPT or Claude to compare three options, and it came back with a tidy table, a couple of formulas, and a flowchart. In the chat window it looks great. Then you select it, paste it into Word or an email, and it falls apart: the table is a row of pipes and dashes, the formula shows its raw $ markers, the code block loses its colors, and the diagram is a paragraph of graph TD gibberish.
Nothing is broken. Assistants answer in Markdown — a plain-text format where | draws tables, ** means bold, and fenced blocks hold code. The chat window renders that for you; a plain-text paste does not. What you copied was the source, not the page.
So handing that answer to a colleague, attaching it to a ticket, or filing it for later takes two steps rather than one: render the Markdown properly, then print the render to PDF.
Three steps: paste, preview, save as PDF
- Paste the raw Markdown. Copy the assistant's reply and drop it into the Markdown Preview editor — or drag in a
.mdfile. The preview appears beside it as you type; there is no "convert" button to look for. - Read the preview. This is exactly the page that becomes your PDF, so give it a glance: tables should have borders, formulas should be typeset, diagrams should be drawn. If a table's columns did not line up, adding a blank line before it usually fixes what the assistant mangled.
- Click Print / Save as PDF. Your browser's print dialog opens. Choose "Save as PDF" as the destination and you have your file.
What actually renders: tables, math, and Mermaid diagrams
AI answers lean hard on the parts of Markdown that basic viewers skip, which is where tools differ:
- GitHub-flavored tables — the comparison table is the single most common thing an assistant produces, and it renders with real borders and aligned columns.
- Task lists and footnotes —
- [ ]checkboxes stay checkboxes, and footnote markers link to their notes. - Syntax-highlighted code — fenced blocks keep their language coloring instead of flattening into gray text.
- Math — inline
$x^2$and block$$...$$formulas are typeset by KaTeX, so an explanation full of notation reads as notation. - Mermaid diagrams — a fenced
mermaidblock is drawn as an actual flowchart, sequence diagram, ER diagram, state machine, or Gantt chart. This is the one most Markdown-to-PDF converters quietly drop, and it is precisely what an assistant reaches for when you ask it to map out a process.
The print dialog, and what comes out of it
Three settings are worth a look before you save:
- Destination — pick "Save as PDF" in Chrome and Edge, or "PDF → Save as PDF" in Safari and Firefox.
- Background graphics — turn it on. Browsers skip background colors when printing to save ink, which flattens code blocks and table headers to plain white. In Chrome the switch is under "More settings".
- Paper size — A4 or Letter, whichever your reader prints on.
The file is produced by the browser's own layout engine rather than by screenshotting the page, and that has four consequences worth knowing:
- The text is real text — selectable, searchable and copyable at any zoom, with fonts that render correctly in every language. Not a picture of text.
- Links keep their addresses. You cannot click paper, so each external link is followed by its URL in print.
- Nothing is cut in half. Headings are not stranded at the bottom of a page, and code blocks, tables, blockquotes and diagrams stay whole rather than splitting across a page break.
- No browser header line. The margins are tight enough that there is no room to stamp the URL, page title and date across every page, so the PDF reads as a document instead of a printout of a website.
After the PDF: shrink it, or combine several
A long answer with several diagrams and a lot of highlighted code can produce a bigger file than you expect — diagrams are vector art, and vector art with many nodes adds up. If it is too heavy for an email attachment or a ticket upload, run it through Compress PDF and check the result.
And if one session produced three answers worth keeping, save each as its own PDF, then use Merge PDF to put them in order in a single document. That reads far better than three attachments named document (2).pdf.
Why this belongs in your browser
Think about what is actually sitting in that chat. Internal architecture. Unreleased code. A client's name. Salary bands. A draft you have not published. Pasting it into a "free Markdown to PDF" site means handing every line of it to a stranger's server, where it is logged, retained on whatever schedule they choose, and outside your control from that moment on.
There is no reason to. Your browser already contains a first-class Markdown renderer, a typesetting engine, a diagram renderer, and a PDF writer. Markdown Preview wires them together and runs the whole thing on your device: the text is parsed locally, the diagrams are drawn locally, and printing is a local operation too. Nothing is uploaded, no account is required, and once the page has loaded it keeps working with the network switched off.
Quick checklist
- Copy the assistant's raw Markdown, not a screenshot.
- Paste it in and read the preview — that is the page you will get.
- Columns not lining up? Add a blank line before the table.
- Print / Save as PDF → destination "Save as PDF" → background graphics on.
- Too big for email? Compress it. Several answers? Merge them.
Quick steps
- 1Copy the assistant's raw Markdown reply and paste it into the Markdown Preview editor, or drag in a .md file. The rendered preview appears as you type — no convert button to hunt for.
- 2Read the preview and fix anything the assistant mangled. This is exactly the page that becomes your PDF, so check that tables have borders, formulas are typeset, and diagrams are drawn.
- 3Click Print / Save as PDF, choose "Save as PDF" as the destination, and turn on background graphics so code blocks and table headers keep their shading.
Frequently asked questions
Because what you copied is Markdown source, not the rendered page. The chat window formats it for you on screen, but a plain-text paste carries the raw syntax: tables arrive as rows of pipes and dashes, formulas show their dollar signs, code blocks lose their colors, and a Mermaid diagram becomes a paragraph of graph TD text. Rendering it first is the step that is missing.
Yes. Formulas are typeset with KaTeX and Mermaid blocks are drawn as real flowcharts, sequence diagrams, ER diagrams and Gantt charts before printing, so they land in the PDF as the finished visuals rather than as code. Diagrams are also kept whole — one will not be split across a page break.
It is real text. The PDF is produced by the browser's own layout engine rather than by screenshotting the page, so every word stays selectable, searchable and copyable at any zoom level, and the fonts render correctly in every language.
No. The page margins are deliberately tight enough that the browser has no room to stamp its header and footer on each page, so the result reads as a document rather than as a printout of a web page. External links do keep their addresses, printed after the link text, since you cannot click paper.
No. The Markdown is parsed and rendered entirely in your browser, and printing is a local operation too, so nothing is sent to a server at any point. That matters more than usual here: AI conversations routinely contain unreleased code, client names, internal architecture and figures you would not paste into a random website.