Render any Django template to a PDF
Project description
PDF Render is a Django app that provides functions to render PDF files from Django templates.
To do so, it bundles all files required for template rendering and sends them to a separate server for processing. Using Chromium on a separate server ensures PDFs that are consistent with browser-rendered templates.
Quick start
Run a pdf-render-server:
docker run -p 3000:3000 kuboschek/pdf-render-server
Add PDF_RENDER_SERVER to your settings:
PDF_RENDER_SERVER = 'http://localhost:3000'
Use the functions from ‘pdfrender’ to render PDFs in your views:
pdfrender.render_to_bytes(template_name, context) pdfrender.render_to_response(template_name, context, filename=None) pdfrender.render_to_file(template_name, fp, context)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file django_pdf_render-0.1.3.tar.gz
.
File metadata
- Download URL: django_pdf_render-0.1.3.tar.gz
- Upload date:
- Size: 3.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 15bfd3b7c62b0c75a92206402c2118f5306296dc9275b2f15cdc16278573aa18 |
|
MD5 | e8c2189c28d121ab5487130542820699 |
|
BLAKE2b-256 | 3cb92aef680ad3eec0186b9b284cbc431b5a858b0bb2675a1e7245f9bee7a6a1 |