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.