
An Mkdocs plugin to download documentation pages as pdf.
The MkDocs Page to PDF plugin is a versatile tool designed for developers looking to convert their MkDocs pages into PDF files efficiently. It leverages the power of Playwright (Chromium headless) to produce high-quality PDF outputs that mirror the on-screen experience of the documentation. In addition to generating PDFs, the plugin also adds a convenient download button, making it easy for users to access the content they need.
Whether you’re managing extensive documentation or simply want to share a specific page with others, this plugin streamlines the process and offers various customization options to tailor the PDF output to your requirements.
Easy Installation: Set up is straightforward with a simple pip install for the plugin, followed by the installation of Playwright browsers.
Customizable Options: Adjust settings in your configuration file to optimize PDF rendering according to your preferences, including disabling features as needed.
Flexible PDF Rendering: Control the scale, header and footer visibility, and page margins, ensuring the output meets your visual specifications.
Exclusion of Content: Specify patterns to exclude certain pages from being rendered into PDFs, maintaining control over what gets shared.
Download Link Configuration: Customize the HTML for the PDF download link, allowing for a branded or tailored user experience.
Troubleshooting Support: Includes guidance for running the plugin in Docker containers, helping troubleshoot common issues tied to environment setup.
Landscape and Page Range Options: Have the flexibility to choose landscape orientation or specific page ranges for printing, enhancing utility for varied documentation needs.
Automatic Scaling and Background Printing: Options for scaling the content and printing background graphics ensure that the PDF output is both professional and visually appealing.
