openoffice转换过程中遇到繁体字文档转换失败的问题
今天发现上线的文档转换功能中存在一个文档转换不成功,查看后台日志标志文档无法加载成功,提示日志如下:
INFO: connected
Jul 08, 2015 2:50:33 PM com.artofsolving.jodconverter.openoffice.connection.AbstractOpenOfficeConnection connect
INFO: connected
com.artofsolving.jodconverter.openoffice.connection.OpenOfficeException: conversion failed: could not load input document
at com.artofsolving.jodconverter.openoffice.converter.OpenOfficeDocumentConverter.loadAndExport(OpenOfficeDocumentConverter.java:134)
at com.artofsolving.jodconverter.openoffice.converter.OpenOfficeDocumentConverter.convertInternal(OpenOfficeDocumentConverter.java:120)
at com.artofsolving.jodconverter.openoffice.converter.AbstractOpenOfficeDocumentConverter.convert(AbstractOpenOfficeDocumentConverter.java:104)
at com.artofsolving.jodconverter.openoffice.converter.AbstractOpenOfficeDocumentConverter.convert(AbstractOpenOfficeDocumentConverter.java:74)
at com.artofsolving.jodconverter.openoffice.converter.AbstractOpenOfficeDocumentConverter.convert(AbstractOpenOfficeDocumentConverter.java:70)
at cn.com.pujiConvert.convert.ConvertDocumentToPdf.convertingToPdf(ConvertDocumentToPdf.java:122)
at cn.com.pujiConvert.convert.ConvertDocumentToPdf.getConvertPdfResult(ConvertDocumentToPdf.java:200)
at cn.com.pujiConvert.timer.ConvertTimerTask.convertDocumentToPdfTask(ConvertTimerTask.java:16)
at cn.com.pujiConvert.timer.ConvertTimerTask.run(ConvertTimerTask.java:49)
at java.util.TimerThread.mainLoop(Timer.java:555)
at java.util.TimerThread.run(Timer.java:505)
Jul 08, 2015 2:50:33 PM com.artofsolving.jodconverter.openoffice.connection.AbstractOpenOfficeConnection disposing
INFO: disconnected
于是改为流转换方式
DocumentConverter converter = new StreamOpenOfficeDocumentConverter(connection);
converter.convert(documentFile, pdfFile);
调用运行后,生成相应pdf文件,但是再由pdf文件生成的缩略图却是一片空白,swf文件实际上没有生成成功。直接后台下载pdf文档到本机查看,提示pdf文档损坏。于是认真查看了原始的doc文档,原文中都是繁体字,进行繁简转换后,上传重新转换成功。由此推测应该是缺少繁体字的字体,导致openoffice打开文件没有响应,导致转化失败,这个需要进一步研究确认。
openoffice转换过程中遇到繁体字文档转换失败的问题的更多相关文章
- JAVA:借用OpenOffice将上传的Word文档转换成Html格式
为什么会想起来将上传的word文档转换成html格式呢?设想,如果一个系统需要发布在页面的文章都是来自word文档,一般会执行下面的流程:使用word打开文档,Ctrl+A,进入发布文章页面,Ctrl ...
- OpenOffice Word文档转换成Html格式
为什么会想起来将上传的word文档转换成html格式呢?设想,如果一个系统需要发布在页面的文章都是来自word文档,一般会执行下面的流程:使用word打开文档,Ctrl+A,进入发布文章页面,Ctrl ...
- java将office文档pdf文档转换成swf文件在线预览
第一步,安装openoffice.org openoffice.org是一套sun的开源office办公套件,能在widows,linux,solaris等操作系统上执行. 主要模块有writer(文 ...
- 将Latex tex文档转换成 word文档(上)
有时候逼不得已,必须得将自己精心排版好的latex 文档 转换成word 给别人编辑 以下提供一个方法 下载 Tex2Word 工具,地址我的网盘 安装 解压后安装,使用默认安装路径 安装过程中.点击 ...
- word ppt excel文档转换成pdf
1.把word文档转换成pdf (1).添加引用 using Microsoft.Office.Interop.Word; 添加引用 (2).转换方法 /// <summary> /// ...
- C#实现文档转换成PDF
网上有很多将doc.ppt.xls等类型的文档转换成pdf的方法,目前了解到的有两大类: 1.使用虚拟打印机将doc.ppt.xls等类型的文档 2.使用OFFICE COM组件 我采用了第二种方法实 ...
- DOM和SAX是应用中操纵XML文档的差别
查看原文:http://www.ibloger.net/article/205.html DOM和SAX是应用中操纵XML文档的两种主要API.它们分别解释例如以下: DOM.即Do ...
- 将html版API文档转换成chm格式的API文档
文章完全转载自: https://blog.csdn.net/u012557538/article/details/42089277 将html版API文档转换成chm格式的API文档并不是一件难事, ...
- ABBYY FineReader 15新增智能PDF文档转换功能
ABBYY FineReader 15(Windows系统)新增智能PDF文档转换功能,可自动检测导入PDF数字文档的文本层质量,确保转变为可编辑格式后的准确结果:从表单字段和文本框中提取文本,准确保 ...
随机推荐
- C# 系统应用之通过注册表获取USB使用记录(一)
该文章是“个人电脑历史记录清除软件”项目的系统应用系列文章.前面已经讲述了如何清除IE浏览器的历史记录.获取Windows最近访问文件记录.清除回收站等功能.现在我需要完成的是删除USB设备上的U盘. ...
- C#的排列组合类
C#的排列组合类 //-----------------------------------------------------------------------------//// 算法:排列组合 ...
- mat之一--eclipse安装Memory Analyzer
工欲善其事必先利其器,先开始更新下eclipse,顺便装下工具软件.那么简要的写写怎么从头安装Memory Analyzer Memory Analyzer (Eclipse MAT)是一个跨平台的开 ...
- How to detect and avoid memory and resources leaks in .NET applications
By Fabrice Marguerie Despite what a lot of people believe, it's easy to introduce memory and resourc ...
- SQL Server查询性能优化——堆表、碎片与索引(一)
SQL Server在堆表中查询数据时,是不知道到底有多少数据行符合你所指定的查找条件,它将根据指定的查询条件把数据表的全部数据都查找 一遍.如果有可采用的索引,SQL Server只需要在索引层级查 ...
- StringBuffer和String 的例子
public class Example { String str = new String("good"); static StringBuffer sbf=new String ...
- ab的排列 aa , ab ba,bb
package reverseList; public class Main { static void perm(char c[],int lev,char ans[]) { if(c.length ...
- linux下mysql的表名问题
最近从win转移到了linux,在本机跑好的程序但在linux下一个SQL语句报了错误,发现是表名未找到,错误原因是在linux下mysql的表名是严格区分大小写的.. MYSQL在LINUX下数据库 ...
- json.net json转换神器
json.nethttps://json.codeplex.com/ api documenthttp://james.newtonking.com/json/help/index.html#
- MySQL开发中常用的查询语句总结
1.查询数值型数据: SELECT * FROM tb_name WHERE sum > 100; 查询谓词:>,=,<,<>,!=,!>,!<,=>, ...