🚀
Zero Config
Sensible defaults out of the box — just pass markdown and get a beautifully formatted PDF. No setup required.
Generate beautifully formatted PDFs directly from Markdown. Zero config, works in browser and Node.js.
npm install jspdf-md-rendererimport { jsPDF } from 'jspdf'
import { MdTextRender } from 'jspdf-md-renderer'
const doc = new jsPDF()
await MdTextRender(doc, '# Hello World\n\nRendered with **jspdf-md-renderer**!', {
cursor: { x: 10, y: 10 },
page: { maxContentWidth: 190, maxContentHeight: 277, lineSpace: 1.5,
defaultLineHeightFactor: 1.2, defaultFontSize: 12, defaultTitleFontSize: 14,
topmargin: 10, xpading: 10, xmargin: 10, indent: 10 },
font: { bold: { name: 'helvetica', style: 'bold' },
regular: { name: 'helvetica', style: 'normal' },
light: { name: 'helvetica', style: 'light' } },
endCursorYHandler: (y) => console.log('Ended at Y:', y),
})
doc.save('output.pdf')| Element | Syntax | Status |
|---|---|---|
| Headings | # H1 to ###### H6 | ✅ |
| Paragraphs | Plain text | ✅ |
| Bold / Italic | **bold** / *italic* | ✅ |
| Lists | - unordered, 1. ordered, nested | ✅ |
| Links | [text](url) | ✅ |
| Images | {width=200 align=center} | ✅ |
| Tables | GFM pipe tables | ✅ |
| Code Blocks | Fenced ` ``` ` blocks | ✅ |
| Inline Code | `` `code` `` | ✅ |
| Blockquotes | > quote | ✅ |
| Horizontal Rules | --- | ✅ |