$npx skillfedfor your agent

md2pdf

The Markdown to PDF conversion tool with styles

With conditionsPyPI UtilitiesReleased Mar 2026204.9K downloads / moMITPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — md2pdf-3.1.1-py3-none-any.whl
v3.1.1 · released 2026-03-31 · Python >=3.10 · 6 runtime deps: jinja2, markdown, pygments, pymdown-extensions, python-frontmatter, weasyprint

Yes, if you need to convert markdown to styled PDFs. The package is actively maintained, has no known vulnerabilities, low install friction, and a permissive license. The main condition is ensuring weasyprint's system dependencies are available on your platform—check the weasyprint installation guide before installing. For markdown-to-PDF workflows, this is a solid, production-ready choice.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Weasyprint must be fully functional on your system; see https://doc.courtbouillon.org/weasyprint/stable/first_steps.html#installation for platform-specific setup.
  • Low friction: pure Python wheel with six runtime dependencies (jinja2, markdown, pygments, pymdown-extensions, python-frontmatter, weasyprint).
  • Active maintenance with last commit 2026-08-14.

License · maintenance · safety

MIT (permissive) — MIT license (permissive) means you can use, modify, and distribute md2pdf freely in commercial and private projects with minimal restrictions.

last release 2026-03-31 (136 days) · last repo commit 2026-08-14 · 439 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 204,901 downloads/mo, #9,597 on PyPI

Verify before relying

pip install md2pdf[cli]
md2pdf -i README.md

Or as a library:
from md2pdf.core import md2pdf
md2pdf('output.pdf', md='input.md', css='style.css')
  • Whether weasyprint's system dependencies (e.g., Cairo, Pango) are easily available on all target platforms or represent a common installation barrier.
  • Performance characteristics when processing large markdown files or batch conversions with the --workers parameter.
Same gist for agents: .md · .json

What it is and what it does

md2pdf is a Markdown-to-PDF converter that bridges markdown source files and styled PDF output. It accepts markdown input (from files or raw strings), applies optional CSS stylesheets, and renders the result as a PDF using weasyprint as its rendering engine. The tool supports Jinja2 templating within markdown, allowing dynamic content injection via frontmatter or programmatic context variables, and integrates markdown extensions from pymdown-extensions for features like syntax highlighting and emoji support.

You can use it as a command-line tool for one-off conversions or batch processing (with parallel workers), or embed it in Python code as a library function. It's designed for developers who need to generate styled PDF documentation from markdown sources—common in technical writing, report generation, and documentation pipelines. The package supports Python 3.10 through 3.14 and is actively maintained.

Use it for

  • Generate styled PDF documentation from markdown README files with custom CSS branding.
  • Batch convert multiple markdown files to PDF with parallel processing using the --workers option.
  • Create dynamic PDF reports by embedding Jinja2 templates and frontmatter variables in markdown source.
  • Integrate markdown-to-PDF conversion into a Python application or documentation build pipeline.
  • Render markdown with syntax-highlighted code blocks using pymdown-extensions and custom CSS.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, if you need to convert markdown to styled PDFs.

The package is actively maintained, has no known vulnerabilities, low install friction, and a permissive license. The main condition is ensuring weasyprint's system dependencies are available on your platform—check the weasyprint installation guide before installing. For markdown-to-PDF workflows, this is a solid, production-ready choice.

Install

md2pdf on PyPI

Before you install

Low friction: pure Python wheel with six runtime dependencies (jinja2, markdown, pygments, pymdown-extensions, python-frontmatter, weasyprint). Active maintenance with last commit 2026-08-14. Requires weasyprint to be fully functional on your system before use, per the documentation.

Weasyprint must be fully functional on your system; see https://doc.courtbouillon.org/weasyprint/stable/first_steps.html#installation for platform-specific setup.

License in practice

MIT license (permissive) means you can use, modify, and distribute md2pdf freely in commercial and private projects with minimal restrictions.

Quickstart

pip install md2pdf[cli]
md2pdf -i README.md

Or as a library:
from md2pdf.core import md2pdf
md2pdf('output.pdf', md='input.md', css='style.css')

Verify before relying

  • Whether weasyprint's system dependencies (e.g., Cairo, Pango) are easily available on all target platforms or represent a common installation barrier.
  • Performance characteristics when processing large markdown files or batch conversions with the --workers parameter.

Package facts

LicenseMIT permissive
Python supportSupports the current Python release >=3.10
Install frictionLow. Pure-Python wheel
Runtime dependencies
6 packages
jinja2markdownpygmentspymdown-extensionspython-frontmatterweasyprint
MaintenanceActively maintained 136 days since the last release
Last repo commit
First released
Downloads204,901 / month, #9,597 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 5 - Production/StableEnvironment :: ConsoleIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: MacOSOperating System :: Microsoft :: WindowsOperating System :: POSIXProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Office/BusinessTopic :: Utilities

Evidence: md2pdf-3.1.1-py3-none-any.whl

Tags

Capabilities
markdown to pdf conversionmd to pdf cli toolmarkdown pdf generatorconvert markdown documents pdfmarkdown with css styling pdfjinja markdown templates pdfsyntax highlighting markdown pdf
Topics
markdown-to-pdfdocument-generationcli-tool
PyPI keywords
clicsshtmlmarkdownpdf

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “markdown to pdf conversion”

  • md2pdfConverts Markdown files to PDF with custom CSS styling, Jinja…
  • doclingDocling parses diverse document formats—PDF, DOCX, PPTX, XLSX, HTML,…
  • markitdown-no-magikaConverts various file formats (PDF, Excel, Word, HTML, images, and…

Give your agent the search over MCP, or paste the wish link into any chat.

More Utilities packages

idna Worth it
PyPI · Python Modules · released Jun 2026

Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.

Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.

BSD-3-Clausepure Python · 3.9+
1.8Bdownloads / mo
charset-normalizer Worth it
PyPI · Utilities · released Aug 2026

Detects and normalizes text encoding from unknown or ambiguous sources, supporting all IANA character sets that Python's core library provides codecs for, with the ability to register custom codecs.

permissive licensepure Python · 3.7+
1.7Bdownloads / mo
setuptools Worth it
PyPI · Python Modules · released Aug 2026

Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.

MITpure Python · 3.10+
1.6Bdownloads / mo
pluggy Worth it
PyPI · Libraries · released May 2025

Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.

Install it if you're building an extensible application or framework.

MITpure Python · 3.9+aging
1.3Bdownloads / mo
Pygments Worth it
PyPI · Utilities · released Mar 2026

Pygments is a syntax highlighter that colorizes source code and text in over 500 languages and formats, outputting to HTML, LaTeX, RTF, SVG, images, or ANSI terminal sequences.

Install it if you need to display or transform source code.

BSD-2-Clausepure Python · 3.9+
1.3Bdownloads / mo
six With conditions
PyPI · Libraries · released Dec 2024

Six provides utility functions to write Python code that runs on both Python 2.7 and Python 3.3+, smoothing over language differences between the two versions.

MITpure Python
1.2Bdownloads / mo

See also markdown-pdf · django-weasyprint · mdutils · weasyprint · xhtml2pdf · gh-md-to-html · notion2md · pydyf · mkdocs-with-pdf · markdownify