Provides Django views to wrap the HTML to PDF conversion using puppeteer.
Forked from: django-puppeteer-pdf:v0.1.4.
cli for puppeteer puppeteer-pdf.
Python 3.10+ are supported. See Github Actions build status for details
- Documentation is not up to date but you can see working use cases in examples directory
- Reporting bugs and issues is welcomed
Run pip install git+https://github.com/octavenz/django-puppeteer-pdf.git
.
By default it will execute the first puppeteer-pdf
command found on your PATH
.
It is recommended to specify full path of puppeteer-pdf using one of the way mentioned below.
If you can't add puppeteer-pdf to your PATH
, you can set PUPPETEER_PDF_CMD
to a
specific executable:
e.g. in settings.py
:
PUPPETEER_PDF_CMD = '/path/to/my/puppeteer-pdf'
or alternatively as env variable:
export PUPPETEER_PDF_CMD=/path/to/my/puppeteer-pdf
You may also set PUPPETEER_PDF_CMD_OPTIONS
in settings.py
to a dictionary
of default command-line options.
The default is:
PUPPETEER_PDF_CMD_OPTIONS = { 'format': 'A4', }
MIT License (BSD-2-Clause). See the bundled LICENSE file for more details.
This package is a fork of pypi/django-puppeteer-pdf created by Namespace merged on top of repository created with Cookiecutter and the audreyr/cookiecutter-pypackage project template with modifications by Octave.