When trying to export a Graphical Jaspersoft Studio Based report into PDF format and it gives the following error.
phantomjs process did not end properly; exit value: 127
The problem is related to PhantomJS missing dependencies.
PhantomJS needs fonconfig and libfontconfig dependency to work and they may be missing in your distribution.
To figure out what's wrong in your situation when this error appears do the following:
1. Go to %Tomcatpath%/webapps/reportservice/WEB-INF/js.config.properties and check if the phantomjs.binary property is set correctly.
View the file in a text editor and look for the value:
2. Go to the location PhantomJS binary and run the command:
It should run properly, but you are likely going to receive an error like:
phantomjs: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
phantomjs: error while loading shared libraries: libfontconfig.so.1: cannot open shared object file: No such file or directory
to check what dependencies are missing.
4. Most likely you'll miss fontconfig.
To resolve the issue run the following:
sudo yum install fontconfig libfontconfig.so.1
Run a similar "sudo yum install" command for all the dependencies you might be missing.