By Docify

Markdown to PDF: jsPDF Stripped-Text Dump

• 5 min read

Docify can export Markdown to a PDF, but the file is a jsPDF text dump, not a styled render of the HTML preview. Each line loses heading hashes, asterisk emphasis, and link URLs, then is drawn at 12 pt. Load sample PDF leftovers: Welcome to Markdown; This is a bold text and this is italic text.; the three - list lines stay; ```javascript and the hello() lines stay; Visit Docify for more tools. (https://example.com dropped); > This is a blockquote. stays. Load sample updates the HTML preview and does not run Download PDF. Nothing is uploaded.

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. Load sample fills # Welcome to Markdown and updates the HTML preview. It does not run Download 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.

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 leftover characters

List markers, blockquote >, code fences, table pipes, and a leading ! from images can remain as text. Load sample 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

Is Docify’s Markdown PDF a formatted HTML-to-PDF export?
No. Download PDF walks the Markdown line by line, strips a leading /^#+\s/ heading marker, **bold**, *italic*, and [label](url) (the label is kept, the URL is dropped), then draws leftover text with jsPDF. Load sample PDF leftovers: Welcome to Markdown; This is a bold text and this is italic text.; Features; the three - list lines stay; ```javascript and the hello() lines stay; Visit Docify for more tools. (https://example.com dropped); > This is a blockquote. stays. It does not render the HTML preview.
What formatting is removed before drawing?
Each line drops a leading heading marker matching /^#+\s/, then **bold**, *italic*, and [label](url) (the label is kept, the URL is dropped). Load sample keeps - Easy to write, ```javascript, and > This is a blockquote. Lists, blockquotes, code fences, tables, and images are not turned into PDF structure.
Does the live preview show how the PDF will look?
No. The right-hand pane is sanitized HTML from marked + DOMPurify. The PDF path never uses that HTML. Expect a plain-text dump, not the preview layout.
Does Download PDF upload my Markdown?
No. jsPDF runs in the browser and saves converted.pdf locally. The page does not send the text to a server.

Related