Django Rest Framework LaTeX Renderer
This is a Django Rest Framework renderer which produces LaTeX PDFs.
It's maintained by Pebble (S/F Software) and is used in production in our software.
lualtex to render your documents. To get this on Ubuntu:
sudo aptitude install texlive-latex-extra texlive-xetex
Note: This will probably take some time due to the size of LaTeX (around 1GB)
LATEX_RESOURCES directory contains the base template environment e.g.
any images or static resources to include in your template. This must be set for
the renderer to work:
LATEX_RESOURCES = '/home/user/path_to_resources'
This works just like
TemplateHTMLRenderer but by setting a
from rest_framework import viewsets from rest_framework_latex import renderers class SomeViewSet(viewsets.ViewSet): """ """ renderer_classes = [ renderers.LatexRenderer, ] latex_name = 'directory/latexfile.tex'
The REST Framework LaTeX plugin is compatible with Django 1.9 and up and Django REST Framework 3.3 and up.