Как установить pdftex на мое приложение в Heroku?
Создание Pdf с помощью Latex и Django
Мой код в представлении:
from django_tex.shortcuts import render_to_pdf
from datetime import date
def gerar_lista_turma(request, turma_id):
if request.user.tipo_user() not in ['Admin', 'Professor']:
return redirect('logout')
template_name = 'base_lista.tex'
context = {
'hoje': date.today().strftime("%d/%m/%Y"),
'escola': 'Name'
}
return render_to_pdf(request, template_name, context, filename=f'base.pdf')
Но я получаю ошибку:
Exception Type: CalledProcessError
Exception Value: Command 'pdflatex -interaction=batchmode texput.tex' returned non-zero exit status 127.
Exception Location: /app/.heroku/python/lib/python3.9/subprocess.py, line 528, in run