Generate a PDF file for each MkDocs page
Project description
Mkdocs Page to PDF
An Mkdocs plugin to generate a PDF file for each MkDocs page.
How to use
Install the package with pip:
pip install mkdocs-page-pdf
Enable the plugin in your mkdocs.yml:
plugins:
# - ...
- pdf-export # should be last
Options
Options are directly induced from pyppeteer options :
scale
(float): Scale of the webpage rendering, defaults to1
.displayHeaderFooter
(bool): Display header and footer. Defaults toFalse
.headerTemplate
(str): HTML template for the print header. Should be valid HTML markup with following classes.date
: formatted print datetitle
: document titleurl
: document locationpageNumber
: current page numbertotalPages
: total pages in the document
footerTemplate
(str): HTML template for the print footer. Should use the same template asheaderTemplate
.printBackground
(bool): Print background graphics. Defaults toFalse
.landscape
(bool): Paper orientation. Defaults toFalse
.pageRanges
(string): Paper ranges to print, e.g., '1-5,8,11-13'. Defaults to empty string, which means all pages.format
(str): Paper format. Defaults toA4
.margin
(dict): Paper margins.top
(str): Top margin, accepts values labeled with units, defaults to20px
.right
(str): Right margin, accepts values labeled with units, defaults to20px
.bottom
(str): Bottom margin, accepts values labeled with units, defaults to20px
.left
(str): Left margin, accepts values labeled with units, defaults to20px
.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
mkdocs-page-pdf-0.0.5.tar.gz
(3.6 kB
view hashes)
Built Distribution
Close
Hashes for mkdocs_page_pdf-0.0.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d4e0fd2181338c670b0772cbd8a6d500f466cff0ecf5d1141af9f0cd45d842ab |
|
MD5 | 46eff6b638d0f6ca7308bfb7714a12e1 |
|
BLAKE2b-256 | 42ba3b334685d0c716b60f80be04b04a465d6a8866c570a11dbb7a784ff1cf13 |