MkPDFs for MkDocs
Generate nice documentation PDFs.
MkPDFs for MkDocs is a plugin for MkDocs, a nice static site generator designed for project documentation.
What makes this plugin different to other MkDocs pdf generator plugins, is that it's not dependent to a given plugin and may work with absolutely any MkDocs theme.
Requirements
Before you start, make sure that your system meets the following requirements:
- MkDocs version 0.17.1 or higher
- Python 3.4 or higher
- It depends on WeasyPrint which depends on cairo, Pango and GDK-PixBuf. They need to be installed separately. Please follow your platform installation instructions carefully:
Quick start
Install the latest version of MkPDFs for MkDocs with pip
:
pip3 install mkpdfs-mkdocs
Append the following line to your project's mkdocs.yml
:
plugins:
- search
- mkpdfs
or with options
plugins:
- search
- mkpdfs:
company: The War Company Inc.
author: Monsieur Silvestre
Does it work?
Now run mkdocs serve
to run the dev server or mkdocs build
to build your documentation. If the installation went, well you should see the following message:
The PDF version of the documentation has been generated.
For detailed instructions see the getting started guide.