Document toolboxDocument toolbox

Support center for flex.bi version 3.2

Dashboard export setup using PhantomJS

If you would like to export table reports, Gantt charts or dashboard pages to PDF or if you would like to send regular emails with dashboards as PDF attachments then you need to install PhantomJS on your Private flex.bi server. PhantomJS will be used by flex.bi to convert flex.bi web pages to PDF files.

Icon

Please don't use phantomjs 2.0. It has issues working with flex.bi.

Download and extract PhantomJS installation (flex.bi is tested with latest PhantomJS version 1.9.7) in a directory on your Private flex.bi server and then specify location of your phantomjs executable (or phantomjs.exe on Windows) in the flexbi.toml configuration file (or copy and uncomment configuration from the flexbi.toml.sample file):

 

[phantomjs]
location = "/usr/local/bin/phantomjs"

 

On Windows use single quotes to avoid special processing of the  \ backslash character:

 

[phantomjs]
location = 'C:\phantomjs\phantomjs.exe'

 

After setting the location please restart the Private flex.bi server and you should see the PDF export option in the table reports, Gantt charts and in dashboard pages.

There is good description for alternative installation methods on PhantomJS download page. Please note that for Linux operating systems it is expected that some base libraries necessary for rendering and the basic font files are available in the system. Here is example how to install the dependencies on CentOS/RedHat based systems:

 

sudo yum install fontconfig freetype libfreetype.so.6 libfontconfig.so.1 libstdc++.so.6

 

For better visual results in generated pdf documents we recommended to install Microsoft TrueType fonts. One way to achieve this on CentOS/RedHat is to follow this article. Steps to do:

 

 
sudo rpm -Uvh msttcore-fonts-2.0-3.noarch.rpm

 

If you receive error.txt file when doing export to PDF then please see more detailed phantomjs error message in System Events.