View mixin and utils to generate PDF documents from html using xhtml2pdf.
The most interesting thing here is PDFTemplateResponseMixin. Adding this mixin to class based views allows automatic pdf generation using the view context and a customized template.
There is also the lower level function render_to_pdf, similar to what can be seen in snippet 659.
See the docstrings for a detailed explanation.