Handling PDF extraction via a Job
stankobrin opened this issue · comments
Hi Guys
I have this plugin working 100% perfectly via a normal controller (thank you!), however have tried to move this onto a queue'd Job in the background - now we get a "Command not Found" error:
`Spatie\PdfToText\Exceptions\CouldNotExtractText: The command "'/usr/bin/pdftotext' '-layout' '-r' '96' '/home/vagrant/Code/xxx.pdf' '-'" failed.
Exit Code: 127(Command not found)
Working directory: /home/vagrant/Code/xxx
Output:
Error Output:
sh: 1: exec: /usr/bin/pdftotext: not found
in /home/vagrant/Code/xxxx/vendor/spatie/pdf-to-text/src/Pdf.php:73
Is there something we need to change when updating this to a Job? I have checked permissions and source of the files and all looks perfect on that side.
Any help would be appreciated.
Make sure PHP running on the CLI has the right permissions to call that binary.