Examples for using WeasyPrint as a Python library.
Feel free to read the related article.
Clone this repository, then make it the working directory:
git clone https://github.com/bowmanjd/pyweasyprintdemo.git
cd pyweasyprintdemo
Recommended: create a virtual environment and activate it. Then,
pip install -e .
mkdir out
python weasyprintdemo.py sample.html out/sample.pdf
If you installed in a currently active virtual environment, as recommended above, you can use a shorter form:
weasyprintdemo sample.html out/sample.pdf
Please feel free to submit pull requests and/or open issues.
Copyright 2020 Jonathan Bowman. All documentation and code contained in this repository may be freely shared in compliance with the Apache License, Version 2.0, and is provided “AS IS” without warranties or conditions of any kind.