以下安装步骤在debian5上测试通过
安装JRE
http://blog.linuxphp.org/archives/572/
安装基本包
apt-get install openoffice.org-core openoffice.org-java-common xvfb openoffice.org-writer openoffice.org-calc apt-get install openoffice.org-l10n-zh-cn openoffice.org-l10n-zh-tw python-uno openoffice.org-draw openoffice.org-impress
配置虚拟桌面
Xvfb :1 -screen 0 800x600x24& export DISPLAY=localhost:1
运行soffice服务
soffice -headless -accept="socket,host=127.0.0.1,port=8100;urp;" -nofirststartwizard &
文档转为Pdf(支持多种格式)
unoconv -f pdf mrtg.doc
pdf转为swf
pdf2swf -t mrtg.pdf -o mrtg.swf -s flashversion=9
flexpaper播放
wget http://flexpaper.googlecode.com/files/FlexPaper_1.4.5_flash.zip
解压缩后有个index.html是示例,用到的文件是
flexpaper/js/flexpaper_flash.js flexpaper/FlexPaperViewer.swf
SwfFile参数指定要播放的swf文件路径
问题1
javaldx: Could not find a Java Runtime Environment
如已经配置好JRE还是报错
apt-get install openoffice.org-java-common
问题2
soffice.bin X11 error: Can’t open display
apt-get install xvfb Xvfb :1 -screen 0 800x600x24& export DISPLAY=localhost:1
问题3
unoconv: UnoException during conversion: URL seems to be an unsupported one.
apt-get install openoffice.org-writer openoffice.org-draw openoffice.org-impress python-uno
如果还有问题可能是soffice启动不对,重启下试试
问题4
如果中文乱码
apt-get install openoffice.org-l10n-zh-cn openoffice.org-l10n-zh-tw
仍然不能解决问题,杀死soffice进程,重新启动试试
问题5
unoconv: File could not be loaded by OpenOffice
windows txt文件换行符问题,用程序把"\r\n"替换为"\n"
问题6
Unable to connect or start own listener. Aborting.
使用正确的方法启动soffice如果是soffice -accept=”socket,port=8100;urp;”改为
soffice -headless -accept="socket,host=127.0.0.1,port=8100;urp;" -nofirststartwizard &
参考:
http://www.oschina.net/p/flexpaper
http://hi.baidu.com/lurim/blog/item/7d21f13ea39f22e554e723d8.html
http://rainx.cn/blog/archives/140
http://blog.sina.com.cn/s/blog_502c8cc40100n6zz.html
http://rongjih.blog.163.com/blog/static/33574461201161172331383/
http://www.linux-wiki.cn/index.php/%E6%96%87%E6%A1%A3%E6%A0%BC%E5%BC%8F%E6%89%B9%E9%87%8F%E8%BD%AC%E6%8D%A2(doc,txt,pdf%E7%AD%89)
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=491456
jadexo 2011, November 7, 3:50 PM
评论前必须登录!
注册