在Linux中常常涉及到多种文档格式,如doc、txt、html、rtf等等。为了方便文件传递,就需要在各种格式之间进行转换。LibOffice可以方便的打开多文档格式并按需进行转换,但要一次处理大量文件或要编写脚本进行转换时,仅用LibOffice就难以胜任了。 用unoconv就可以轻松地实现利用LibOffice可以打开的文档的转换.
【1】安装libreoffice
http://www.libreoffice.org/download/
安装所有的rpm
# rpm -ivh *.rpm
错误
libgnomevfs-2.so.0()(64bit) 被 libobasis4.4-gnome-integration-4.4.5.2-2.x86_64 需要
解决方法:
# yum install *.rpm
【2】安装unoconv
http://pkgs.repoforge.org/unoconv/
错误:
正在处理依赖关系 openoffice.org-pyuno >= 2.0,它被软件包 unoconv-0.5-1.el6.rf.noarch 需要
解决方法:
https://github.com/dagwieers/unoconv
make install
【3】乱码问题
将Windows下的Fonts,如:C:\Windows\Fonts,压缩成Fonts.zip压缩包。
将压缩包拷贝到Linux目录下,执行如下命令即可:
unzip Fonts.zip
mkdir /usr/share/fonts/win
cp Fonts/* /usr/share/fonts/win
cd /usr/share/fonts/win
chmod -Rf 755 *
mkfontscale
mkfontdir
fc-cache –fv
重启服务器即可。
---------------------
原文:https://blog.youkuaiyun.com/aoshilang2249/article/details/49429135