ueberdosis / pandoc

A PHP wrapper for Pandoc to convert any text format in any other text format
MIT License
77 stars 10 forks source link

Error generating PDF: lstat(./pdflatex) failed #35

Closed davidjr82 closed 2 years ago

davidjr82 commented 2 years ago

I got this error when running from the application, but if I run the exact command in the bash, I get the PDF:

lstat(./pdflatex) failed: ./pdflatex: No such file or directory kpathsea: Can't get directory of program name: ./pdflatex

Any ideas why is this happening?

davidjr82 commented 2 years ago

I will answer myself. From the symfony process, pandoc cannot find the pdflatex engine. It is solved adding the full path of the pdf engine as an option:

(...)->option('pdf-engine', '/usr/bin/pdflatex')

Thanks!