shootify's picture

Hello guys, when are you going to upload or have available ninja invoice V5... looking forward. thanks

Forum: 
Jeremy Davis's picture

Hi there. Firstly, a warm welcome to TurnKey! :)

Next up, yes we do plan to. Ideally it will be sooner rather than later, but there is currently blocker.

For v4.x, we provided a local install of PhantomJS to do the PDF generation. However, PhantomJS is abandonware and isn't being maintained. As such, the InvoiceNinja devs don't provide support for locally installed PhantomJS in v5.x. That's probably wise. So the options for processing PDFs are the online PhantomJS service (which is free, but requires that your Invoice Ninja server is public facing; and you need to trust the service to process your PDFs) or a local Chrome install. (Whilst the docs say "Chrome", it's open source cousin; Chromium should work fine, and that's what we'd use - so from here on in when I say "Chrome", please read "Chromium").

For us, the requirement of a 3rd party service is unacceptable. If you are happy to use the 3rd party service, then that's fine. But we don't want to make that decision for you... So that leaves using Chrome. The problem there is that whilst the actual functionality is headless (i.e. you can use Chrome via the commandline to generate the PDFs) there isn't a minimalist headless Chrome install. Installing Chrome on TurnKey makes the image ~500MB bigger! So that's unacceptable too!

I have some ideas of how we might move forward, but I we're currently in the process of rebuilding/refreshing the library. So I don't currently have the time or energy to test them out and play around...

shootify's picture

thank you very much for letting me know. hopefully you can get it working since they already released it. 

Peter McGrath's picture

FWIW SnapPDF seems to be a good alternative to PhantomJS. Invoice Ninja V5 is working for me with SnapPDF.
Jeremy Davis's picture

Thanks for posting Peter. That's useful info.

Is there anything special required to install/include that? Or is it a default component if you do a manual install? I had a quick look at the install docs and couldn't find anything specific?! Although I did find a note recommending use of the built in snappdf package - so I guess it's included?!

Regardless, I do hope to create a new Invoice Ninja5 appliance in the not too distant future. However, Debian 11/Bullseye is very close to release, so it won't happen until after that...

Peter McGrath's picture

Ive always built Invoice Ninja on CentOS so not sure about Debian but it should work similar. The read me for snap PDF is here: snappdf/README.md at master · beganovich/snappdf · GitHub I had some issues but created a post about what fixed SnapPDF for me here SnapPDF on CentOS8 - Self-Hosted | v5 - Discourse (invoiceninja.com). Having said that  I think this is somewhat out of date as when i install the latest version of invoice ninja all of the dependencies seem to already be there. You just have to edit the .env file (for me thats in /var/www/html/ninja and change PDF_GENERATOR=snappdf Then whenever editing .env I run:
sudo -u nginx php artisan optimize
Jeremy Davis's picture

Thanks for sharing Peter! :)

kebel87's picture

Thanks Jeremy, I'll be amongst those interested in using invoiceninja v5 when it will be ready. 

Add new comment