Sendpdf is a simple Django app that can be used to generate PDF documents from html templates.
It can handle images and css very well. The generated PDF can then be displayed in the browser for printing and saving.
Alternatively, one can send the PDF to one or many email addresses.
Has been tested with Django 3+. Versions prior to 2.0.0 has been tested with Django==1.9.
Detailed documentation is in the official page.
Checkout the latest code in the repo wanderijames/django-sendpdf and use docker and docker compose to test its functionality.
Quick start
Install django-sendpdf:
$ pip install django-sendpdf
Install wkhtmltopdf:
Debian/Ubuntu:
$ sudo apt-get install wkhtmltopdf
Warning! Version in debian/ubuntu repos have reduced functionality (because it compiled without the wkhtmltopdf QT patches), such as adding outlines, headers, footers, TOC etc. To use this options you should install static binary from wkhtmltopdf site or you can use this script.
Windows and other options: check wkhtmltopdf homepage for binary installers
Add “sendpdf” to your INSTALLED_APPS setting like this:
INSTALLED_APPS = ( ... 'sendpdf', )In your Django settings add the location of wkhtmltopdf, default location is /usr/local/bin/wkhtmltox/bin/wkhtmltopdf, like this:
WKTHMLTOPDF_PATH = "/usr/local/bin/wkhtmltopdf"
Include the sendpdf URLconf in your project urls.py like this:
path(r'^sendpdf/', include('sendpdf.urls', namespace='sendpdf')),Run python manage.py runserver to see some demos:
Metadata
Release files for django-sendpdf 2.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| django-sendpdf-2.0.1.tar.gz | 28.0 kB | Without provenance | Details for django-sendpdf-2.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| django_sendpdf-2.0.1-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for django_sendpdf-2.0.1-py2.py3-none-any.whl |
Total release size: 48.4 kB
Release files / django-sendpdf-2.0.1.tar.gz
| Download URL | django-sendpdf-2.0.1.tar.gz |
|---|---|
| Size | 28.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
015bb95a9386165c93ec56b08b0456b3c842ae557eb6567b2efbb0ec3a223e6a
|
|
BLAKE2b-256 checksum How to use checksums |
d001d4ff706265646a22fe97cd3c5185345a13e8b559fc036f1486bb0d47cb5d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/39.2.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.6.5
|
Release files / django_sendpdf-2.0.1-py2.py3-none-any.whl
| Download URL | django_sendpdf-2.0.1-py2.py3-none-any.whl |
|---|---|
| Size | 20.3 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
dd5a2dd57480196b9f56ad17710c3240b6e2d8b33d3537dfb6c4baba84fe0e26
|
|
BLAKE2b-256 checksum How to use checksums |
73b67cc0fea9927b23533a21650ceb3eade16261dfd5dcface3130f5b80c8ac7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/39.2.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.6.5
|
Security for django-sendpdf 2.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.