Skip to main content


Project description

## What is this

This is a class based mixin to download a class based view as a PDF.

The PDF is generated with firefox and selenium **(tested on ubuntu 14.04 LTS)**.

This is not really performant but generates good PDF's with selectable text.

This is how this is done:

## Example usage:

class InvoiceDetail(PdfDownloadMixin, TemplateView):
template_name = "invoice_print.html"
# PDF mixin attributes
pdf_filename = 'invoice.pdf'


## Options:


The filename of the PDF file download.
Default: download.pdf

**pdf_folder = '/tmp/'**

Default: **python True**

Default: True

Default: True

Default: 'pdf'

## Installation

$ pip install django-pdf-download
System requirements tested on (ubuntu 14.04):
sudo apt-get install firefox xvfb cups-pdf

*cups-pdf* is only used once to setup headless printing (quirk in firefox you can not save as PDF unless you printed via another printer at least once).

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for django-pdf-download, version 0.0.4
Filename, size File type Python version Upload date Hashes
Filename, size django-pdf-download-0.0.4.tar.gz (4.3 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page