MkDocs Exporter
Exports your MkDocs, ProperDocs and Zensical documentation to PDF: a document for each page, and books combining pages into a single document.
Features
- 📚 Books - combine pages into PDF documents with bookmarks, a table of contents and working links
- 🎨 Customizable - full control over the resulting documents
- Cover pages written as Jinja templates
- Headers and footers with page numbers
- Custom stylesheets, scripts and hooks
- Per-page options in the front matter
- Buttons at the top of your pages (e.g. to download the page or the book as PDF)
- Dedicated support for the
materialandreadthedocsthemes, check out sample PDF documents
- ♿ Accessible - documents are tagged for screen readers, with bookmarks, their language and document information
- 🚀 Fast - documents are rendered concurrently, and unchanged ones are reused from a cache
- ⭐ Powerful - documents are printed by Chromium, driven by Playwright, with CSS Paged Media support
Supported tools
| Tool | Support |
|---|---|
MkDocs >= 1.6, < 2 |
✅ A plugin, documents are generated while building the website |
| ProperDocs | ✅ The same plugin |
| Zensical | 🧪 A command, run once the website is built (experimental, see the Zensical guide) |
| MkDocs 2.0 | ⏳ Not yet (it doesn't support plugins) |
Requires Python >= 3.11.5.
Installation
The package is hosted on PyPI and can be installed via pip (or your favourite package manager), along with the browser it uses:
pip install mkdocs-exporter
playwright install --with-deps --only-shell chromium
Upgrading from v6? Read the migration guide.
Usage
The following configuration (adapted from the mkdocs.yml file used by this documentation) covers the main features:
plugins:
- exporter:
formats:
pdf:
enabled: !ENV [MKDOCS_EXPORTER_PDF, true]
concurrency: 8
stylesheets:
- resources/stylesheets/pdf.css
covers:
front: resources/templates/covers/front.html.j2
back: resources/templates/covers/back.html.j2
footer:
right: "Page {page} of {pages}"
books:
- output: documentation.pdf
covers: front
toc:
enabled: true
With MkDocs and ProperDocs, documents are generated by mkdocs build (or properdocs build).
Zensical doesn't run plugins: it ignores this configuration (also accepted as [project.plugins.exporter] in zensical.toml), which the mkdocs-exporter command reads to export the website once it is built:
zensical build
mkdocs-exporter build
Check out the examples: documents generated from a small website (with cover pages, tables of contents, headers and footers...), with their configuration (examples/).
Roadmap
- Combine all pages into a single PDF document (✅ released in
v6.0.0) - Bookmarks, table of contents and links in books (✅ released in
v7.0.0) - Export websites built by Zensical (🧪 experimental, released in
v7.0.0) - Export websites built by MkDocs 2.0
- Create a GitHub action that includes all dependencies to build the documentation and generate PDF documents
Feel free to request additional features by submitting an issue or contributing through a pull request.
Contributing
We welcome contributions from the community to enhance MkDocs Exporter.
Whether you want to report a bug, suggest a feature, improve the documentation, or contribute code, your help is appreciated!
See AGENTS.md for how the project is organized, built and tested.
License
This project is licensed under the MIT License (MIT), which you can read here.
Metadata
Release files for mkdocs-exporter 7.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mkdocs_exporter-7.0.0.tar.gz | 75.0 kB | With provenance | Details for mkdocs_exporter-7.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mkdocs_exporter-7.0.0-py3-none-any.whl | Python 3 | none | any | Details for mkdocs_exporter-7.0.0-py3-none-any.whl |
Total release size: 174.1 kB
Release files / mkdocs_exporter-7.0.0.tar.gz
| Download URL | mkdocs_exporter-7.0.0.tar.gz |
|---|---|
| Size | 75.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2c587dbeebe206487bb68cd3abc21fdf2c252d8ee80c4c9019fa507af2bccd81
|
|
BLAKE2b-256 checksum How to use checksums |
7c68dc689284a7c873ee58c7e83c606e180500f28aea5b15ad9cf0e30f58c1f7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 17, 2026.
Transparency logRelease files / mkdocs_exporter-7.0.0-py3-none-any.whl
| Download URL | mkdocs_exporter-7.0.0-py3-none-any.whl |
|---|---|
| Size | 99.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5a8ff84c9f7f9c68151ebd047305dda009f54c0161523dedfbbbfc647f4ae5ea
|
|
BLAKE2b-256 checksum How to use checksums |
4bc9601ea78452142bac906a923a86f5ff0eeb719f89c37230b806978a659ad3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 17, 2026.
Transparency logSecurity for mkdocs-exporter 7.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for mkdocs_exporter-7.0.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 17, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.