Hi folks,
I’ve migrated a v4 installation to a v5 installation. I’ve used phantomjs (locally installed via Debian package) with v4 without problems. I tried the following for v5:
- Install phantomjs debian package (Debian Buster)
This didn’t work.
2a. composer require beganovich/snappdf
2b. php artisan optimize
2c. edit .env:
SNAPPDF_CHROMIUM_PATH=/var/www/invoiceninja-url/vendor/beganovich/snappdf/versions/872281-Linux_x64/chrome-linux
SNAPPDF_SKIP_DOWNLOAD=true
NINJA_HOSTED_PDF=false
The laravel log suggests InvoiceNinja is still trying to use PhantomJS:
There was an error generating the PDF with Phantom JS {“exception”:"[object] (App\Exceptions\PhantomPDFFailure(code: 0): There was an error generating the PDF with Phantom JS at /data/www/invoiceninja-url/app/Utils/PhantomJS/Phantom.php:131)
[stacktrace]
#0 /data/www/invoiceninja-url/app/Utils/PhantomJS/Phantom.php(91): App\Utils\PhantomJS\Phantom->checkMime(’{
\t"statusCode"…’, Object(App\Models\InvoiceInvitation), ‘invoice’)
Any suggestions? Should I use PhantomJS? If so, can I use the locally installed phantomjs (Debian Buster package)? Should I use snappdf? Did I install that correctly?
cheers,
Jan