I'm curious..🤔 How do you actually install SnapPDF?

Hi guys.

Well… It is pretty much as the subject headliine says… :+1:

1.) How do you actually install SnapPDF on your own server?

The documentation here Free Source Available Invoicing, Expenses & Time-Tracking | Invoice Ninja doesn’t tell much about it, so If I am correct there isn’t any complete guide on how to actually do it on Invoice Ninja. just bit and cookie trails here and there all over the forum and the documentation itself.

I did found this forum thread that reveals that you need to install some server dependencies on your machine:

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

I’m not sure if it is required for everyone and how it supposed to be configured so it would be nice I suppose not only for me but for everyone here using Invoice Ninja to get this finally clarified.

2.) Also is there any good reason or cons/pros/advantages to using SnapPDF over Phantomjs to generate PDF files?

So back to my original question like I said: :smirk:
How do you actually install SnapPDF on Invoice Ninja server the proper way?

Thanks in advance.

Hi,

@david can you please advise for #1

For #2 the main advantages are that it’s faster and your data doesn’t need to leave your server to generate the PDF.

from the root of the invoice ninja project, run

./vendor/bin/snappdf download

Snappdf will download the correct binary for your platform. One thing to note, you’ll want to execute the download as the web user to ensure the permissions are correct.

so the full command may look like this for ubuntu:

sudo -u www-data ./vendor/bin/snappdf download

Thanks guys.

Do you also need to install all those dependency files I mentioned above?

Yes, these are subsystem requirements for chrome itself to run.

1 Like