Skip to content

Repository files navigation

md2pdf logo

npm version npm downloads License: MIT

Project Page  ·  npm  ·  GitHub

Convert Markdown to PDF with Mermaid diagrams, KaTeX math, Obsidian syntax, syntax highlighting, batch processing, and Table of Contents generation. Available as a CLI and Node.js API.

Installation

# Install globally (for CLI usage)
npm install -g @amitdevx/md2pdf
md2pdf init

# Or use locally within a project (for programmatic usage)
npm install @amitdevx/md2pdf
npx md2pdf init

For more details on installation and setup, see the Getting Started guide.

CLI Usage

The most common way to use md2pdf is via the command line.

Basic Conversion

md2pdf document.md

This will automatically generate document.pdf in the same directory.

Note: All documentation for md2pdf has been moved to the docs/ directory.

Documentation Directory

License

MIT License. See LICENSE for details.

About

md2pdf is a lightweight and efficient Markdown to PDF converter that transforms Markdown documents into clean, professional-quality PDF files while preserving formatting, code blocks, tables, images, and diagrams.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages