andrepaes
1 week ago

Can't generate pdf in background

Posted 1 week ago by andrepaes

Hello, at controller the laravel-snappy works perfectly. But I need to schedule some jobs to send a report every midnight but this error is raised when I try to import the package in the background, it seems the snappy isn't bootstrapped in the background, very strange. The error is: [2019-12-02 21:45:43] local.ERROR: The exit status code '127' says something went wrong: stderr: "sh: /var/www/vendor/h4cc/wkhtmltopdf-amd64/bin/wkhtmltopdf-amd64: not found " stdout: "" command: /var/www/vendor/h4cc/wkhtmltopdf-amd64/bin/wkhtmltopdf-amd64 --lowquality --footer-center 'Pagina [page] de [toPage]' '/tmp/knp_snappy5de586073175e4.62113919.html' '/tmp/knp_snappy5de58607317c44.39613267.pdf'. {"exception":"[object] (RuntimeException(code: 127): The exit status code '127' says something went wrong: stderr: "sh: /var/www/vendor/h4cc/wkhtmltopdf-amd64/bin/wkhtmltopdf-amd64: not found "

The weirdest thing is, I can generate a pdf in the background but I can't do it in background. Thanks in advance, Andé Luiz

Please sign in or create an account to participate in this conversation.