Jex’s Note

使用 Swftools 將 Pdf 轉成圖片

libfreetype6

apt-get install libfreetype6

libgif-dev

apt-get install libgif-dev

libjpeg-dev

apt-get install libjpeg-dev
apt-get upgrade --show-upgraded

zlib1g-dev、freetype

sudo apt-get install zlib1g-dev
sudo apt-get install freetype*

安裝swftools

需先安裝

sudo apt-get install make
sudo apt-get install g++

取得最新版並安裝:

cd /tmp
wget http://www.swftools.org/swftools-2013-04-09-1007.tar.gz
tar -xvf swftools-2013-04-09-1007.tar.gz
cd swftools-2013-04-09-1007
./configure
sudo make
sudo make install

Jodconverter 將word等..轉成pdf

libreoffice

sudo apt-get install libreoffice

fonts dir : /usr/lib/libreoffice/share/fonts/truetype

install font:

example : 文泉驛微米黑 http://wenq.org/wqy2/index.cgi?MicroHei

cd /tmp
wget http://downloads.sourceforge.net/project/wqy/wqy-microhei/0.2.0-beta/wqy-microhei-0.2.0-beta.tar.gz
tar zxvf wqy-microhei-0.2.0-beta.tar.gz
sudo mv wqy-microhei /usr/lib/libreoffice/share/fonts/truetype
rm -rf wqy-microhei*

install jodconverter:

wget https://jodconverter.googlecode.com/files/jodconverter-core-3.0-beta-4-dist.zip
unzip jodconverter-core-3.0-beta-4-dist.zip
mv jodconverter-core-3.0-beta-4 /home/jex/

usege :

java -jar /home/jex/jodconverter-core-3.0-beta-4/lib/jodconverter-core-3.0-beta-4.jar Fonts.docx fonts.pdf

Comments