Cant run snappdf

i try but i can put snappdf to work, all time error thant cant load and now revert to hosted_ninja and take 2 min to load pdf and not show my logo…

i try run

./vendor/bin/snappdf convert --url save.pdf

and get this

Downloading and saving it to save.pdf

In Snappdf.php line 232:

The command “‘/srv/http/Gestao/InvoiceNinja_v5/vendor/beganovich/snappdf/versions/1040184-Linux_x64/chrome-linux/chrome’ ‘–headless’ ‘–disable-gpu’ ‘–disable-tr
anslate’ ‘–disable-extensions’ ‘–disable-sync’ ‘–disable-background-networking’ ‘–disable-software-rasterizer’ ‘–disable-default-apps’ ‘–disable-dev-shm-usag
e’ ‘–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_GqgkyH.pdf’ ‘’” failed.

Exit Code: 126(Invoked command cannot execute)

Working directory: /srv/http/Gestao/InvoiceNinja_v5


Error Output:

sh: line 1: /srv/http/Gestao/InvoiceNinja_v5/vendor/beganovich/snappdf/versions/1040184-Linux_x64/chrome-linux/chrome: cannot execute binary file: Exec format erro
sh: line 1: /srv/http/Gestao/InvoiceNinja_v5/vendor/beganovich/snappdf/versions/1040184-Linux_x64/chrome-linux/chrome: Success



@david do you have any suggestions?

This looks like a permissions problem,

if you run

vendor/bin/snappdf download

It will re download snap, and set the correct permissions.

@david already run

Chromium binary already downloaded. Provide --force to download again.

I try change permissions to 777 but same think :frowning:

i follow the very nice guide of @brackenhill-mob

but not whant to work in my machine :face_with_thermometer:


The issue would be you need to run chmod +x on the chrome binary which is something the download function does, if you add --force to the download does it fix the issue for you?

hi @david no… same error…


from the command line in the root of the project can you please run

./vendor/bin/snappdf convert --html "<h1>Hello world!</h1>" test.pdf

and advise the output.


-bash: !: event not found


./vendor/bin/snappdf convert --html "<h1>Hello world</h1>" test.pdf

without “!” same error…

So this feels like a system issue not allowing the webapp to call the chrome binary from the command line.

What environment are you running?

sorry for delay, yes i allways forget im in raspberry…arm system…
i install in my arch linux and everting is normal… i think is the is missing in my pi…i dont know if i can solve…
any suggestion?? is possibel run snappdf in my pi?



Unsure to be honest, I have no experience with them.

hosted_ninja will work across all platforms thou.

@david it is ok, i will try find elp directly with snanpdf…
but now i have new problem, for a will the hosted_ninja take 1 or 2 minutos…my logo not appear… and now

504: Gateway Timeout

<title>504 Gateway Timeout</title>
<h1>Gateway Timeout</h1>
<p>The gateway did not receive a timely response
from the upstream server or application.</p>

this is a fresh install… maybe open topic…

@david i find the solution

this error 504 i think i solved by add my domain to hosts file.

hosted_ninja and phantom is work fine…but shappdf if i try to see 1 invoice says failed to load pdf, if i go to costumiza design of pdf show 500 error and if i try to open invoice in windows app show me Cannot raster a malformed pdf file

any ideas??


@david @hillel i just found out, when i go to design i have error 500 and after if i enable the html mode the preview is work fine…
strange?? :slight_smile: i realy dont know :slight_smile:


find solution, add to .env file


now everting work fine, i tink shanppdf it was faster but is ok, about same time like hosted ninja :slight_smile:
in the end this is a raspeberry :slight_smile: