Another PhantomJS question

Hello all,
I am trying to run IvoiceNinja on my Synology with intel processor.
I use the web server, available for the current OS
However, I have no success attaching the .pdf files of quotes and invoices to the e-mails the system sends.
From what I understand I need to have some instance of PhantomJS available (either cloud or local).
I prefer local PhantomJS installation, but I can’t figure a way to install it on the Synology OS(DSM).
Is this even possible?

If your app is publicly accessible you should be able to use regardless of the server you’re using.

Are there any details about the error in storage/logs/laravel-error.log

You should be able to install ipkg , and then from there you can install PhantomJS with it, similar to using apt.

I don’t think the app is publicly accessible, and I want to keep it private for now, although I will lose the good looking customer portal. So I will try Titanfail’s way and report if it works.


Ok, somehow it worked this way:
I SSH-ed to the Synology box, I did install ipkg the way Titanfail pointed in the link.
But PhantomJS is not listed in the ipkg packages, so I went on downloading PhantomJS archive from their website, and installing it manually.
I had to have root privileges to be able to do this.
Basically what I had to do is to extract it in /usr/local/share/“PHANTOMJS VERSION”/ and then made a symbolic link to /usr/local/bin.
Then I changed the read/write rights on the phantomjs binary to 0755
Then in the .env file I added the line “PHANTOMJS_BIN_PATH=/var/services/web/phantomjs/phantomjs-2.1.1-linux-x86_64/bin/phantomjs” this was because the initial /usr/local/bin/phantomйс was reported in laravel-error.log as PhantomJS - Failed to load: file_exists(): open_basedir restriction in effect. and so on.
The phantomjs – version reports errors, but it actually works attaching the pdf files to the emails, and in the Email Settings I get Using local PhantomJS under the Attach Invoice tick box.
I am not completely sure this is the right way, nor that it is well described but it works for now.

Glad to hear you were able to make it work, thanks for sharing the solution!

Now to the next milestones to have the system up and running:
I wish I could have number spelling functionallity in the invoice and quote design (very old accounting and legal requirement).
I think a way is to use this PEAR package: Numbers_Words and have it reporting the invoice sum as a text variable when asked.
Note that I have very limited knowledge and skills in any of the programming languages around.
I also need to have the invoices in different languages, again because of the law in force here. The invoices should have the same number and contents, but one copy is in the clients language, and the second is in the issuing side official languge. For now I plan on using special custom invoice designs, that have two identical pages but in different languages, or somehow learn how to add custom module that generates a copy of the invoice and sends it to the accountants in the correct language.
Any help will be very appreciated

The PDF is generated in the browser, you may need to find a JavaScript library to support this.

Note: I imagine this would be difficult to implement even for an experienced developer.

I forgot to mention that you might have to add extra repositories. Didn’t occur to me that ipkg might not have the same ones as apt, and I just assumed it was like I did with sudo apt install phantomjs. Sorry about that.