generate pdf from html using wkhtmltopdf, html, python and django
BSD-2-CLAUSE License
It works on wkhtmltopdf . dj-wkhtmltopdf
will allow user to organize their own pdf generator through django admin without any deployment :).
Run pip install dj-wkhtmltopdf
.
Add 'djwkhtmltopdf' to INSTALLED_APPS
in your settings.py
.
Then run the python manage.py syncdb
.
By default it will execute the first wkhtmltopdf command found on your PATH
.
If you can't add wkhtmltopdf to your PATH
you can set WKHTMLTOPDF_CMD
to a specific execuatable:
e.g. in settings.py
:
WKHTML_TO_PDF_CMD = '/path/to/my/wkhtmltopdf'
You may also set wkhtmltopdf options through django admin or WKHTML_OPTIONS
in settings.py to a dictionary of default command-line options.
WKHTML_OPTIONS = { '--quiet': True, }
MIT licensed. See the bundled LICENSE file for more details.