Registry / devops / mkdocs-with-pdf

mkdocs-with-pdf

JSON →
library0.9.3pypypiunverified

A MkDocs plugin that generates a single PDF file from your MkDocs documentation repository. Version 0.9.3 is the latest stable release (requires Python >=3.6). The project is actively maintained, with periodic releases fixing bugs and adding features.

pip install mkdocs-with-pdf
INSTALL
IMPORT
SIG · MKDOCS-WITH-PDF
M
mkdocs-with-pdf
devopspythonv0.9.3
Install
6.3s avg
Import
Disk
132MB
Pass rate
5/ 10
Env Coverage5 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.9.3 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
build_error
glibc
py 3.103.95 runs
installs and imports cleanly · install 6.3s · import 0.000s · 132MB
132MB installed
● package 132MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

MkdocsWithPdfPlugin
from mkdocs_with_pdf import MkdocsWithPdfPlugin
from mkdocs_with_pdf import MkdocsWithPdfPlugin

Enable the plugin in your mkdocs.yml and build the site to generate a PDF.

# Ensure mkdocs.yml has the plugin enabled: # plugins: # - with-pdf # Then build your docs: mkdocs build
mkdocs --version
Debug
Known issues
gotchaWeasyPrint requires external system dependencies (e.g., cairo, Pango). Install them according to your OS or the PDF generation will fail silently.
fix
Follow the WeasyPrint installation docs: https://doc.courtbouillon.org/weasyprint/stable/first_steps.html
affects: all
breakingPython 3.5 support was dropped in v0.9.0. If you use Python 3.5, stick with v0.8.3.
fix
Upgrade Python to 3.6+ or pin version to 0.8.3.
affects: >=0.9.0
gotchaThe plugin does not work with the 'material' theme's navigation tabs when 'tabs' is set to true. You may need a custom theme or workaround.
fix
Set theme.features.tabs to false or switch to a different theme.
affects: all
deprecatedThe 'exclude_pages' option changed its behavior in v0.9.0. Previously it excluded pages by relative path, now it uses a pattern or regex.
fix
Update your mkdocs.yml to use the new exclude_pages pattern (e.g., '*/api/*').
affects: >=0.9.0
gotchaIf your page titles contain numbers only (e.g., '404'), the plugin may crash. This was fixed in v0.9.3.
fix
Upgrade to v0.9.3 or ensure page titles include letters.
affects: <0.9.3
Upgrade
Version history
0.9.3latest on PyPI · released Jul 3, 2021
Audit
Dependencies
mkdocsrequiredRequired to build documentation and serve as the plugin base.
weasyprintrequiredUsed to render the PDF; must be installed separately on some systems.
Agent activity
8 hits · last 30 days
node
8
Resources
mkdocs-with-pdf — pip install mkdocs-with-pdf · libregistry