skillfed

mkdocs-with-pdf

Generate a single PDF file from MkDocs repository

mkdocs-with-pdf v0.9.3 342.7K downloads/30d#7,395 on PyPI393
Permissive license MIT DORMANT released

What it is and what it does

mkdocs-with-pdf is a plugin for MkDocs that converts your entire documentation site into a single PDF file during the build process. It uses weasyprint as its rendering engine and automatically generates a cover page, table of contents, and heading numbers (h1–h3) in the output. The plugin integrates directly into MkDocs' build pipeline—you enable it in your mkdocs.yml configuration and it runs when you execute mkdocs build.

The package is designed for documentation teams who need to distribute their docs as a single PDF artifact. It offers customization options for cover pages, table of contents depth, heading numbering levels, and page exclusions. However, the project is dormant—the last release was in July 2021 and there have been no commits since May 2024. This means it may not be actively maintained for compatibility with newer MkDocs or Python versions.

Use it for:

  • Export a complete MkDocs documentation site as a single PDF for offline distribution or archival.
  • Generate PDF documentation automatically as part of a CI/CD pipeline for release artifacts.
  • Create printable versions of technical documentation with automatic table of contents and cover pages.
  • Customize PDF output with cover logos, author metadata, and multi-column layouts for specific branding needs.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Generates a single PDF file from an MkDocs documentation site, with automatic table of contents, cover page, and heading numbering.

Yes, with conditions. Install it if you need PDF export from MkDocs and are willing to accept dormant maintenance. The package is stable and has no known vulnerabilities, but you should verify compatibility with your specific MkDocs and Python versions before relying on it in production. Be prepared to manage weasyprint's system-level dependencies (cairo, Pango, GDK-PixBuf) on your build platform.

Install

mkdocs-with-pdf on PyPI

pip

pip install mkdocs-with-pdf

uv

uv add mkdocs-with-pdf

poetry

poetry add mkdocs-with-pdf

Installing mkdocs-with-pdf

Before you install

Low install friction with a wheel distribution. Maintenance is dormant—last release was 2021-07-03 and no commits since 2024-05-25. The package depends on weasyprint, which requires system libraries (cairo, Pango, GDK-PixBuf) to be installed separately on your platform.

License in practice

MIT license is permissive, allowing commercial and private use with minimal restrictions. You must retain the license notice in distributions.

Quickstart

pip install mkdocs-with-pdf

# In mkdocs.yml:
plugins:
  - with-pdf

# Then run:
mkdocs build

WeasyPrint requires cairo, Pango, and GDK-PixBuf system libraries installed separately for your platform (Linux, macOS, or Windows). Python 3.6 or higher and MkDocs 1.0+ are required.

Verify before relying

  • Whether the package works reliably with current MkDocs versions (last release 2021-07-03, no recent maintenance signal)
  • Compatibility with modern Python versions beyond 3.9 (classifiers only list up to 3.9)
  • Performance impact on large documentation sites during PDF generation

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.6)
Install friction low — pure-Python wheel
Runtime dependencies 4 — mkdocs, weasyprint, beautifulsoup4, libsass
Maintenance dormant — 1,868 days since the last release
Last repo commit
First released
Downloads 342,684/month — #7,395 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: mkdocs_with_pdf-0.9.3-py3-none-any.whl

Keywords: mkdocs, pdf, weasyprint

Development Status :: 4 - BetaIntended Audience :: DevelopersIntended Audience :: Information TechnologyLicense :: OSI Approved :: MIT LicenseProgramming Language :: PythonProgramming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9

Tags

mkdocs pdf exportgenerate pdf from documentationmkdocs plugin pdfdocumentation to pdfmkdocs pdf generationweasyprint mkdocspdf from markdown docs
mkdocs-pluginpdf-generationdocumentation-tools

More Documentation packages

docutils

Docutils converts plaintext documentation in…

unclear · top 1,000 on PyPI

Sphinx

Sphinx generates professional documentation…

permissive · top 1,000 on PyPI

griffe

Griffe extracts the complete structure and…

permissive · top 1,000 on PyPI

sphinxcontrib-serializinghtml

A Sphinx extension that outputs documentation…

permissive · top 1,000 on PyPI

alabaster

Alabaster is a clean, responsive Sphinx theme…

permissive · top 1,000 on PyPI

sphinxcontrib-htmlhelp

A Sphinx extension that generates HTML help…

permissive · top 1,000 on PyPI

mkdocs-print-site-plugin

MkDocs plugin that generates a combined print…

permissive · top 15,000 on PyPI

mkdocs-video

A MkDocs plugin that embeds videos in…

permissive · top 15,000 on PyPI

mkdocs-open-in-new-tab

A MkDocs plugin that injects JavaScript to…

permissive · top 15,000 on PyPI

mkdocstrings

An MkDocs plugin that automatically generates…

permissive · top 5,000 on PyPI

mkdocs-autorefs

A MkDocs plugin that automatically creates…

permissive · top 5,000 on PyPI

mkdocs-monorepo-plugin

Enables building multiple sets of documentation…

permissive · top 5,000 on PyPI

django-weasyprint

Provides Django class-based views and response…

permissive · top 15,000 on PyPI

mkdocs-click

Generates API documentation for Click…

permissive · top 5,000 on PyPI

mkdocs-multirepo-plugin

Merges documentation from multiple Git…

permissive · top 15,000 on PyPI

mkdocs-git-revision-date-plugin

Adds a Git-based revision date to MkDocs…

permissive · top 15,000 on PyPI