$npx skillfedfor your agent

markdown-pdf

Markdown to pdf renderer

With conditionsPyPI MarkupReleased May 2026557.0K downloads / moAGPL-3.0-onlyPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — markdown_pdf-1.13.2-py3-none-any.whl
v1.13.2 · released 2026-05-28 · Python >=3.8 · 5 runtime deps: PyMuPDF, markdown-it-py, requests, plantuml, six

Yes, if you need to generate PDFs from markdown programmatically and can accept the AGPL-3.0-only license. The package is actively maintained, has low install friction, carries no known vulnerabilities, and offers a straightforward API with useful features like TOC generation, image embedding, and plugin support. The AGPL license is the main constraint: verify it aligns with your project's licensing model before committing.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python 3.8 or later.
  • PyMuPDF may require system libraries; see PyMuPDF documentation for platform-specific setup.
  • Low install friction with a pure Python wheel.

License · maintenance · safety

AGPL-3.0-only (agpl) — Licensed under AGPL-3.0-only. This copyleft license requires that any derivative work or modification must also be released under AGPL-3.0-only and that source code be made available to users. Consider this constraint if you plan to integrate it into proprietary or differently-licensed software.

last release 2026-05-28 (78 days) · last repo commit 2026-05-28 · 154 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 557,003 downloads/mo, #6,016 on PyPI

Verify before relying

pip install markdown-pdf

from markdown_pdf import MarkdownPdf, Section

pdf = MarkdownPdf(toc_level=2)
pdf.add_section(Section("# Title\n\nContent here"))
pdf.save("output.pdf")
  • Whether plantuml and mermaid diagram rendering requires external services or local installations beyond what the package provides.
  • Performance characteristics and file size limits for large markdown documents or many embedded images.
  • Exact CSS subset supported for styling; whether all standard CSS properties work as expected.
Same gist for agents: .md · .json

What it is and what it does

markdown-pdf is a Python library that transforms markdown text into PDF documents. It uses markdown-it-py to parse markdown into HTML and PyMuPDF to render that HTML as PDF. The package handles UTF-8 text in any language, embeds images referenced in markdown, generates a table of contents from headings, supports custom CSS styling, and allows multiple page sizes within a single document. It also provides a plugin system for rendering code blocks like plantuml diagrams into images.

The typical workflow is to create a MarkdownPdf instance, add one or more Section objects containing markdown text, optionally configure CSS and metadata, and then save to a file or bytes buffer. Each section starts on a new page, and you can control which heading levels appear in the table of contents. The package is designed for programmatic PDF generation from markdown content rather than as a command-line tool, though the description includes an example CLI script.

Use it for

  • Generate user guides or technical documentation from markdown source files with automatic table of contents and consistent styling.
  • Create multi-section reports where each section can have different page sizes, margins, or styling rules.
  • Embed images and diagrams (via plantuml plugin) directly into PDFs generated from markdown templates.
  • Batch-convert markdown files to PDFs with custom branding via CSS and document metadata.
  • Build documentation pipelines that render markdown to PDF with internal cross-references and clickable hyperlinks.

Worth the install?

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

With conditions

Yes, if you need to generate PDFs from markdown programmatically and can accept the AGPL-3.0-only license.

The package is actively maintained, has low install friction, carries no known vulnerabilities, and offers a straightforward API with useful features like TOC generation, image embedding, and plugin support. The AGPL license is the main constraint: verify it aligns with your project's licensing model before committing.

Install

markdown-pdf on PyPI

Before you install

Low install friction with a pure Python wheel. Actively maintained as of 2026-05-28 with 154 repository stars. Five runtime dependencies (PyMuPDF, markdown-it-py, requests, plantuml, six) are all established packages.

Requires Python 3.8 or later. PyMuPDF may require system libraries; see PyMuPDF documentation for platform-specific setup.

License in practice

Licensed under AGPL-3.0-only. This copyleft license requires that any derivative work or modification must also be released under AGPL-3.0-only and that source code be made available to users. Consider this constraint if you plan to integrate it into proprietary or differently-licensed software.

Quickstart

pip install markdown-pdf

from markdown_pdf import MarkdownPdf, Section

pdf = MarkdownPdf(toc_level=2)
pdf.add_section(Section("# Title\n\nContent here"))
pdf.save("output.pdf")

Verify before relying

  • Whether plantuml and mermaid diagram rendering requires external services or local installations beyond what the package provides.
  • Performance characteristics and file size limits for large markdown documents or many embedded images.
  • Exact CSS subset supported for styling; whether all standard CSS properties work as expected.

Package facts

LicenseAGPL-3.0-only agpl
Python supportSupports the current Python release >=3.8
Install frictionLow. Pure-Python wheel
Runtime dependencies
5 packages
PyMuPDFmarkdown-it-pyrequestsplantumlsix
MaintenanceActively maintained 78 days since the last release
Last repo commit
First released
Downloads557,003 / month, #6,016 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Operating System :: OS IndependentProgramming Language :: Python :: 3

Evidence: markdown_pdf-1.13.2-py3-none-any.whl

Tags

Capabilities
markdown to pdf convertergenerate pdf from markdownmarkdown pdf renderercreate pdf documents from markdownmarkdown document to pdfmarkdown pdf generationconvert markdown files to pdf
Topics
pdf-generationmarkdown-processingdocument-rendering

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 converter”

  • markdown-pdfConverts markdown text to PDF files, with support for tables, images,…
  • gh-md-to-htmlConverts GitHub-flavored Markdown to HTML with support for offline…
  • pypandocPypandoc wraps pandoc, a universal document converter, letting you…

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

More Markup packages

PyYAML Worth it
PyPI · Python Modules · released Sep 2025

PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.

MITcompiled wheel · 3.8+
1.2Bdownloads / mo
markdown-it-py Worth it
PyPI · Python Modules · released May 2026

A Python markdown parser that converts markdown to HTML following the CommonMark specification, with support for plugins and custom syntax rules.

Install it if you need reliable markdown-to-HTML conversion.

MITpure Python · 3.10+
613.8Mdownloads / mo
beautifulsoup4 Worth it
PyPI · Python Modules · released Jun 2026

Beautiful Soup parses HTML and XML documents into a navigable tree, providing Pythonic methods to search, iterate, and modify the parsed content.

Install it if you need to parse or extract data from markup documents.

MITpure Python · 3.7.0+
432.1Mdownloads / mo
et-xmlfile With conditions
PyPI · Markup · released Oct 2024

et_xmlfile writes large XML files with minimal memory overhead by serializing elements to disk as they are created, rather than holding the entire tree in memory.

Install it if incremental XML writing fits your use case; skip it if your XML documents are small or you already use lxml.

MITpure Python · 3.8+dormant
343.3Mdownloads / mo
tomlkit Worth it
PyPI · Markup · released Jul 2026

Parses and edits TOML files while preserving formatting, comments, and structure, then serializes them back with layout intact.

Install it if you're building tools that touch TOML files and user readability of the source matters.

MITpure Python · 3.9+
338.0Mdownloads / mo
docstring-parser Worth it
PyPI · Python Modules · released Apr 2026

Parses Python docstrings in ReST, Google, Numpydoc, and Epydoc formats, extracting structured information like descriptions, parameters, return types, and exceptions.

Install it if you need to programmatically read and extract structured data from Python docstrings.

MITpure Python · 3.8+
274.9Mdownloads / mo

See also md2pdf · mdutils · pdfkit · weasyprint · gh-md-to-html · mistune · markdown-to-confluence · plantuml-markdown · mkdocs-with-pdf · xhtml2pdf