OFFICE-CONVERTER
use this module, you should confirm LibreOffice and Unoconv installed in your machine.
install LibreOffice
-
on OS X down dmg file from link
-
CentOS / RedHat
CentOS and RedHat 7.2 自带 OpenOffice 4.3,如果想获得更好的体验,建议更换成LibreOffice,首先要卸载OpenOffice
yum remove openoffice* libreoffice*从 RPM packages 安装LibreOffice
wget http://download.documentfoundation.org/libreoffice/stable/5.2.5/rpm/x86_64/LibreOffice_5.2.5_Linux_x86-64_rpm.tar.gztar -xvf LibreOffice_5.2.5_Linux_x86-64_rpm.tar.gzcd LibreOffice_5.2.5.x_Linux_x86-64_rpm/RPMS/yum localinstall *.rpmlibreoffice5.2
install unoconv
-
on OS X
通过 Homebrew 安装
brew install unoconvbrew install ghostscript -
CentOS / RedHat
从 github 下载程序包
git clone https://github.com/dagwieers/unoconv.git# copycp unoconv/unoconv /usr/bin# or link unoconv to /usr/binln -s unoconv/unoconv /usr/bin/unoconv
warning
unoconv start need use port 2002, so if want register unoconv as a service, should check port usage first.
Usage
var converter = ;converter;
if use this module to converting documents, you can start a unoconv listener first
var converter = ;
or
var converter = ;converter;