Environment: javastuserver11.0464-bit, OpenJDK6, and OpenOffice3 use jodconverter to use OpenOffice's document conversion service. during actual deployment, there is a problem of Chinese conversion garbled characters. The detailed installation and deployment process is as follows: 1) run the following command to install OpenOffice and related libraries: $ sudoapt-getinstallxvfb -- & gt; about 11. environment: Ubuntu Server 11.04 64-bit, OpenJDK 6, and OpenOffice 3 Use jodconverter to use OpenOffice's document conversion service. during actual deployment, Chinese conversion garbled characters are encountered, the installation and deployment process is as follows:
1) run the following command to install OpenOffice and related libraries:
$ Sudo apt-get install xvfb --> about 11.5 MB
$ Sudo apt-get install openoffice.org --> about 130 MB
$ Sudo apt-get install openoffice.org-java-common
$ Sudo apt-get install language-pack-zh-* --> required Chinese Character pack
$ Sudo apt-get install language-selector-common --> about 35.4 MB
2) Modify/etc/environment (this does not seem to work, I have not tried it)Modify LANGUAGE = "zh_CN: zh" to LANGUAGE = "zh_CN: zh: en_US: en". If not, add it. Save and exit. Run the following two Commands: $ source/etc/environment $ fontconfig-voodoo-f zh_CN.
3) install openjdk6 and the Chinese font configuration (this is the key to solving Chinese garbled characters)$ Sudo apt-get install openjdk-6-jdk --> install openjdk6 $ sudo apt-get install ttf-wqy-microhei --> install the Chinese font and run the following command to modify the Java font configuration: $ sudo vi/usr/lib/jvm/java-6-openjdk/jre/lib/fontconfig. modify properties to the value corresponding to the following node: allfonts. umingcn = WenQuanYi Microhei Heiallfonts. uminghk = WenQuanYi Microhei Heiallfonts. umingtw = WenQuanYi Microhei Heiallfonts. wqy-zenhei = WenQuanYi Microhei Heiallfonts. shanheisun = WenQuanYi Microhei Heifilename. wenQuanYi_Microhei_Hei =/usr/share/fonts/truetype/wqy/wqy-microhei.ttc
4) Start the OpenOffice document conversion Service (remember the symbol)$/Usr/lib/libreoffice/program/soffice. bin-headless-nologo-norestore-nofirststartwizard-accept = "socket, host = localhost, port = 8100; urp" & Note: 8100 is the port number, which can be changed as needed.
Other considerations:If jodconverter has the following exception, you only need to start jodconverter's tomcat service and OpenOffice's document conversion service with the same user:
com.artofsolving.jodconverter.openoffice.connection.OpenOfficeException: conversion failed: could not save output document; OOo errorCode: 525
com.artofsolving.jodconverter.openoffice.converter.OpenOfficeDocumentConverter.loadAndExport(OpenOfficeDocumentConverter.java:142)
com.artofsolving.jodconverter.openoffice.converter.OpenOfficeDocumentConverter.convertInternal(OpenOfficeDocumentConverter.java:120)
com.artofsolving.jodconverter.openoffice.converter.AbstractOpenOfficeDocumentConverter.convert(AbstractOpenOfficeDocumentConverter.java:104)
com.artofsolving.jodconverter.openoffice.converter.OpenOfficeDocumentConverter.convertInternal(OpenOfficeDocumentConverter.java:88)
com.artofsolving.jodconverter.openoffice.converter.AbstractOpenOfficeDocumentConverter.convert(AbstractOpenOfficeDocumentConverter.java:82)
......