Metadata-Version: 2.1
Name: django-sendpdf
Version: 2.0.0
Summary: Generate PDF from html templates and print, view or send via email
Home-page: http://django-sendpdf.readthedocs.io/en/latest
Author: James Wanderi
Author-email: wanderikinyanjui@gmail.com
License: MIT License
Download-URL: https://github.com/wanderijames/django-sendpdf
Keywords: django,PDF
Platform: UNKNOWN
Classifier: Environment :: Web Environment
Classifier: Framework :: Django
Classifier: Intended Audience :: Developers
Classifier: Natural Language :: English
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Development Status :: 4 - Beta
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
Requires-Dist: pdfkit

========
Sendpdf
========

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.

It has been tested with Django==1.9.

Detailed documentation is in the `official page <http://django-sendpdf.readthedocs.io/en/latest>`_.

Quick start
--------------

1. Install django-sendpdf:

.. code-block:: bash

  $ pip install django-sendpdf

2. Install wkhtmltopdf:

* Debian/Ubuntu:

.. code-block:: bash

  $ 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 <http://wkhtmltopdf.org/>`_ site or you can use `this script <https://github.com/JazzCore/python-pdfkit/blob/master/travis/before-script.sh>`_.

* Windows and other options: check wkhtmltopdf `homepage <http://wkhtmltopdf.org/>`_ for binary installers


3. Add "sendpdf" to your INSTALLED_APPS setting like this::

    INSTALLED_APPS = (
        ...
        'sendpdf',
    )

4. 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"

4. Include the sendpdf URLconf in your project urls.py like this::

    path(r'^sendpdf/', include('sendpdf.urls', namespace='sendpdf')),

5. Run `python manage.py runserver` to see some demos:

    `Template example <http://127.0.0.1:8000/sendpdf/>`_

    `View PDF inline <http://127.0.0.1:8000/sendpdf/show/>`_

    `Dewnload PDF <http://127.0.0.1:8000/sendpdf/download/>`_

    `Send PDF <http://127.0.0.1:8000/sendpdf/send/>`_


