涉及到的图片请看附件。
libreOffice转换的代码:
public String doDocToFdpLibre() {
// File inputFile = new File("d:/1.txt");
// File inputFile = new File("d:/ppt.ppt");
// File inputFile = new File("d:/pptx.pptx");
// File inputFile = new File("d:/doc.doc");
// File inputFile = new File("d:/docx.docx");
// File inputFile = new File("d:/xls.xls");
File inputFile = new File("d:/jpg.jpg");
// File inputFile = new File("d:/gif.gif");
System.out.println("libreOffice开始转换..............................");
Long startTime = new Date().getTime();
//
// txt:使用libreOffice来转换pdf,转换成功,但是中文有乱码!!!!!
// doc:这是office中的doc文档,可以转换成功,并且中文没有乱码
//docx:这是office中的docx文档,可以转换成功,并且中文没有乱码
//ppt和pptx:转换成功。
//xls:转换成功,没有中文乱码
//xlsx:转换成功
//jpg和png:成功
String libreOfficePath = "D:/Program Files (x86)/LibreOffice 4";
// 此类在jodconverter中3版本中存在,在2.2.2版本中不存在
DefaultOfficeMana