Provides Django views to wrap the HTML to PDF conversion using puppeteer.
Forked from: django-wkhtmltopdf.
cli for puppeteer puppeteer-pdf.
Python 2.6+ and 3.3+ are supported. See travis-ci build status for details
- Current version is only tested as a use of django rest framework renderer examples/drf_renderer.py
- 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 django-puppeteer-pdf.
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',
}
Documentation is available at http://django-puppeteer-pdf.readthedocs.org/en/latest/.
MIT licensed. See the bundled LICENSE file for more details.