'How can I install pdftex on my app in Heroku?

Folling Create Pdf with Latex and Django

My code in view:

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')

But i get the error:

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


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source