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 https://github.com save.pdf
and get this
Downloading https://github.com 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’ ‘https://github.com’” failed.
Exit Code: 126(Invoked command cannot execute)
Working directory: /srv/http/Gestao/InvoiceNinja_v5
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
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
i follow the very nice guide of @brackenhill-mob https://forum.invoiceninja.com/t/howto-install-invoice-ninja-v5-on-arch-linux/6196
but not whant to work in my machine
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 ld-linux-x86-64.so.2 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
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<title>504 Gateway Timeout</title>
<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
@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?? i realy dont know
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
in the end this is a raspeberry