By Docify

Markdown to PDF Converter: jsPDF Plain-Text Export

• 5 min read

Export Markdown as a plain-text PDF using jsPDF. Formatting is stripped: headings become plain text, bold and italic are removed, and tables appear as pipe-delimited lines. The PDF uses a fixed 12pt font. All processing runs locally in your browser. Try the live converter.

A printable copy of notes is useful. This page describes what Docify actually writes, so you do not expect a polished typeset document. For HTML instead, use the Markdown-to-HTML guide and the live converter.

How to export the text dump

Step 1: Paste the Markdown

Type or paste into the left-hand box. There is no .md upload. The preview updates as you type. Download HTML saves (converted.html) or Download PDF (converted.pdf). The HTML preview is for reading the parse, not a proof of the PDF.

Step 2: Click Download PDF

On the Markdown converter, Download PDF builds a jsPDF document from the raw Markdown string and saves converted.pdf. The page does not upload the text.

Step 3: Expect plain lines, not layout

You get wrapped text on default jsPDF pages. There are no heading styles, list bullets as structure, clickable links, or the preview's CSS. Download PDF output is converted.pdf. The sibling Download HTML output is converted.html — a different, sanitized-fragment path.

What the exporter does line by line

Split and strip

The Markdown is split on newlines. Each line runs /^#+\s/ (so ## Title becomes Title, but #NoSpace is left as-is), then removes **…**, *…*, and [label](url) keeping label. Empty lines are drawn as a single space.

Draw with jsPDF

Font size is 12. Text starts at y = 20, wraps with splitTextToSize(..., 170), and advances 7 units per wrapped line. A new page is added when y goes past 280. The HTML from marked is never passed to jsPDF.

What stays visible as output characters

List markers, blockquote >, code fences, table pipes, and a leading ! from images can remain as text. GFM table output pipes of | Name | Count | / | --- | --- | / | Ada | 2 | stay as those lines. The example keeps - Easy to write, ```javascript, and > This is a blockquote.. This is not a CommonMark-to-PDF typesetter.

When this export is enough

A readable text copy

Short notes and drafts can travel as a PDF without a desktop toolchain. If you need styled headings, page headers, or clickable links, use another HTML-to-PDF path after you copy the sanitized HTML.

Not a print preview

Do not treat the live preview as “how the PDF will look.” Those are two pipelines. The preview guide covers the HTML pane only.

Export a text-only Markdown PDF

jsPDF stripped-line dump, saved as converted.pdf. Not a styled HTML render. Nothing is uploaded.

Use Markdown Converter →

FAQ

How does Markdown to PDF conversion work?
The PDF export runs jsPDF on the raw Markdown string. It strips heading markers, bold, italic, and link URLs, then draws 12pt wrapped text. The HTML from marked is never passed to jsPDF, so this is not an HTML-to-PDF render. Tables and code blocks appear as raw text.
Does this tool upload my Markdown?
No. All conversion runs in your browser. Your text never leaves your device.
Are images included in the PDF?
No. The export is plain text. Markdown image syntax is not drawn as pictures; a leading ! can remain as a character. There is no image embedding, including data URLs.
Can I style the PDF output?
No. There are no heading styles, list structure, clickable links, or the HTML preview CSS. Font size is 12. For styled output, download the sanitized HTML instead and print it with another tool.

Related