借助Phantomjs生成pentaho dashboard的pdf输出格式

环境: CentOS 5.4, Pentaho 5.3

下载 phantomjs编译版本

wget http://phantomjs.googlecode.com/files/phantomjs-1.9.2-linux-x86_64.tar.bz2

tar xvf phantomjs-1.9.2-linux-x86_64.tar.bz2

cd phantomjs

wget https://raw.githubusercontent.com/ariya/phantomjs/master/examples/rasterize.js

生成pdf文件:

bin/phantomjs rasterize.js http://www.baidu.com baidu.pdf

bin/phantomjs rasterize.js ‘http://xxx.xxx.xxx.xxx:8080/pentaho/api/repos/%3Apublic%3ASteel%20Wheels%3ADashboards%3AHome%20Dashboard.xcdf/generatedContent?ts=1439186533366&userid=admin&password=password’ Steel_Whells.pdf

Pentaho BI Server生成pdf格式时中文字体丢失

环境:CentOS 5.2, Pentaho BI Server 5.3

定位问题是出在linux服务器缺少对宋体字体的支持

在windows XP上的c:\\\\windows\\\\fonts目录下找到宋体文件simsun.ttc,放至到linux目录下/tmp

在linux上的操作如下:
sudo mkdir /usr/share/fonts/songti
sudo cp /tmp/simsun.ttc /usr/share/fonts/songti/

fc-cache /usr/share/fonts/songti/
fc-list :lang=zh

Pentaho chart legend 无法在bi server中显示中文

环境: CentOS 6.4, Pentaho BI server 5.3,  Pentaho Report Designer 5.3

一直被设计的报表中legend中无法显示中文苦恼,寻找良久才发现是服务器CentOS缺少对中文字体的支持

ls /usr/share/fonts

 

一股脑把对中文的支持全部装上

sudo yum groupinstall chinese-support

重启BI Server

./stop-pentaho.sh

./start-pentaho.sh