SnapPDF not Enabled

Hi.

When I go to heath check is says SnapPDF not enabled.
image

If I change .env from
PDF_GENERATOR=hosted_ninja to PDF_GENERATOR=snappdf

it will fail to generate pdfs.
image

What to do?

Thank you

Br,
Dali

Hi,

Which PDF rendered do you see listed above in the health check dialog?

There was a bug in the previous release which caused the ‘SnapPDF not enabled’ message to be shown even if it was enabled.

With .env setting PDF_GENERATOR=hosted_ninja
image

With .env setting PDF_GENERATOR=snappdf
image

Are there any errors in storage/logs?

The one that works for me is PDF_GENERATOR=hosted_ninja

snappdf will have a green check but fails to render PDFs.

What are benefits of using a snappdf over hosted_ninja?

Br,
Dali

If you use hosted_ninja the PDF is generated on our servers, if you use snappdf it’s generated on your server

Makes sense, yes.

Indeed I will go for snappdf. Will check logs a bit later.

Thank you

Br,
Dali

Here is invoiceninja.log.

Error Output:

/var/www/invoiceninja/vendor/beganovich/snappdf/versions/1032348-Linux_x64/chrome-linux/chrome: error while loading s
hared libraries: libatk-1.0.so.0: cannot open shared object file: No such file or directory

[2022-08-09 09:59:02] production.INFO: The command “‘/var/www/invoiceninja/vendor/beganovich/snappdf/versions/1032348
-Linux_x64/chrome-linux/chrome’ ‘–headless’ ‘–disable-gpu’ ‘–disable-translate’ ‘–disable-extensions’ ‘–disable-
sync’ ‘–disable-background-networking’ ‘–disable-software-rasterizer’ ‘–disable-default-apps’ ‘–disable-dev-shm-u
sage’ ‘–safebrowsing-disable-auto-update’ ‘–run-all-compositor-stages-before-draw’ ‘–no-first-run’ ‘–no-margins’
‘–no-sandbox’ ‘–print-to-pdf-no-header’ ‘–hide-scrollbars’ ‘–ignore-certificate-errors’ ‘–print-to-pdf=/tmp/pdf_
k2bPLc.pdf’ ‘/tmp/html_El18Nc.html’” failed.

Exit Code: 127(Command not found)

Working directory: /var/www/invoiceninja/public

Output:

Error Output:

/var/www/invoiceninja/vendor/beganovich/snappdf/versions/1032348-Linux_x64/chrome-linux/chrome: error while loading s
hared libraries: libatk-1.0.so.0: cannot open shared object file: No such file or directory

[2022-08-09 10:00:01] production.INFO: Sending recurring invoices 2022-08-09 10:00:01
[2022-08-09 10:00:01] production.INFO: 2022-08-09 Sending Recurring Invoices. Count = 0
[2022-08-09 10:00:02] production.INFO: Sending invoice reminders 2022-08-09 10:00:02
[2022-08-09 11:00:01] production.INFO: Sending recurring invoices 2022-08-09 11:00:01
[2022-08-09 11:00:01] production.INFO: 2022-08-09 Sending Recurring Invoices. Count = 0
[2022-08-09 11:00:01] production.INFO: Sending invoice reminders 2022-08-09 11:00:01

Maybe this will help:

Yes, that did the trick.

sudo apt install libnss3-dev libatk1.0-0 libatk-bridge2.0-0 libcups2 libgbm1 libpangocairo-1.0-0 libgtk-3-0

Thank you so much!!!

Br,
Dali

1 Like