I’ve been pulling my hair out trying to get snappdf to work. I’m sure i’m just missing something very basic but i’ve gone through all the instructions and read all the forum issues but i just can’t seem to get it to work.
I’ve followed the instructions on installing snappdf:
added the PDF_GENERATOR=snappdf in the .env
run artisan optimize
running it manually worked ok under the local account so it seems to be a permissions issue with www-data?
when i run sudo -u www-data ./vendor/bin/snappdf download it says permission denied but when i check
@Ninja-5:~$ ls -l ./vendor/bin/
total 4
-rwxrwxr-x 1 xxxxxx xxxxxxx 3212 May 5 12:01 snappdf
according to this www-data should be able to execute?
just saw this is the laravel.log
[2024-05-05 04:32:19] production.ERROR: Browser binary not found. Make sure you download it or set using setChromiumPath(). {“userId”:1,“exception”:"[object] (Beganovich\Snappdf\Exception\Binary>[stacktrace]
I’m sure it’s something very simple i’m missing so any help would be appreciated.
Ubuntu 22.04.4 LTS
InvoiceNinja 5.8.52
PHP 8.1.28
UPDATE —
i got chromium installed but now i get this in the logs.
production.ERROR: The command “‘/snap/bin/chromium’ ‘–headless’ ‘–disable-gpu’ ‘–disable-translate’ … ‘–print-to-pdf=/tmp/pdf_oqRgo4.pdf’ ‘/tmp/html_9Q6OG0.html’” failed
so still not working.