PDF prints requisites¶
Genropy offers different solutions and tools for creating prints.
However, they are all based on the creation of HTML which can then be immediately transformed into the corresponding PDF and then printed. For this reason, if you want to produce prints in this way, you need to install:
The Python library pyPdf2
The Python library WeasyPrint
WeasyPrint¶
To install WeasyPrint on macOS you need to install these pre-requisites:
brew install python pango libffi
On Windows, however, GTK3 is required.
And finally about Ubuntu:
apt install python3-pip python3-cffi python3-brotli libpango-1.0-0 libharfbuzz0b libpangoft2-1.0-0
Regardless of the platform it is then possible to proceed with the installation with pip:
pip install weasyprint
Hint
For installation we recommend referring to the WeasyPrint Documentation
Troubleshooting¶
wkhtmltopdf (legacy)¶
Since July 2022 wkhtmltopdf is to be considered deprecated and to be used just in case of backward compatibility problems.
You can install it by downloading the version for your operating system from the site https://wkhtmltopdf.org