One conversion function
Pass Markdown to an async function and receive a Uint8Array containing the PDF.
Generate PDF bytes in your application, or convert Markdown files from your terminal.
Install @pardown/core, convert a Markdown string, and write the returned bytes to a file:
npm install @pardown/coreimport { writeFile } from 'node:fs/promises';
import { markdownToPdf } from '@pardown/core';
const markdown = '# Project update\n\nThe release is **ready**.';
const pdf = await markdownToPdf(markdown);
await writeFile('project-update.pdf', pdf);Pardown parses Markdown with Comark and renders PDF documents with Jasy.
You can use Pardown as a library or as a command-line tool: