django-xhtml2pdf 0.0.3
A Django app to generate pdfs from templates
THis project is wrapper code between the django project and the xhtml2pdf project.
What it does is simply allow people to create xhtml2pdf templates using all the cool django things like STATIC_URL etc.. (like one would for a webpage template), and the utils function makes all the images and ressources appear in the pdf.
Usage
Simply do the following:
from django_xhtml2pdf.utils import generate_pdf
def myview(response):
resp = HttpResponse(content_type='application/pdf')
result = generate_pdf('my_template.html', file_object=resp)
return result
| File | Type | Py Version | Uploaded on | Size | # downloads |
|---|---|---|---|---|---|
| django-xhtml2pdf-0.0.3.tar.gz (md5) | Source | 2011-08-30 | 3KB | 760 | |
- Author: Christopher Glass
- License: BSD License
- Platform: OS Independent
-
Categories
- Environment :: Web Environment
- Framework :: Django
- Intended Audience :: Developers
- License :: OSI Approved :: BSD License
- Operating System :: OS Independent
- Programming Language :: Python
- Topic :: Internet :: WWW/HTTP :: Dynamic Content
- Topic :: Software Development :: Libraries :: Application Frameworks
- Package Index Owner: chrisglass
- DOAP record: django-xhtml2pdf-0.0.3.xml
