PDFs don't load (not snappdf, hosted_ninja)

I have a freshly installed InvoiceNinja Turnkey System and PDFs just don’t work. I’ve tried to use ‘hosted_ninja’ but it breaks sometimes and I can only view them when using the React version of the UI. I also have no ability to use Snappdf because it has ‘no route’ or something. At this point, it doesn’t even say that.

I’ve reinstalled and redownloaded the InvoiceNinja files over and over and get the same basic issues. Apart from PDFs being weird, and a very minor email issue (which is resolved), the system works well and I like the React UI a lot.


When you say hosted_ninja breaks, does it just not render the PDF for you? If you can inspect your browser console for any potential errors we can advise.

In regards to snappdf. Do you see any errors in the logs? There are subsystem dependencies needed for it to work.

some troubleshooting tips here:

in terms of logs, I don’t what I’d be looking for. I also have no ability to see ‘system logs’ from the web UI.
When I try to install the dependencies, do I need to be inside the vendor directory?

System dependencies can be installed anywhere.

Invoice ninja specific dependencies should be run there.

for example, if your system does not have Chrome installed try this as the web user from the root of the Invoice Ninja directory

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

If chrome is present, the system will not download chrome so you can move onto the next step which is testing if snappdf can create a pdf, try the following:

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

If successful a pdf will be created, or an error thrown by the system.

The log files are located in storage/logs/laravel.log

Inspect this file and you can paste the error message to us here.