when i try to Transform <strong> text into pdf </strong>1.configed use openoffice as default Converter2.when use windows everything is ok,the default font use in pdf is<strong> simsun </strong>3.but when i use linux ,the font used in the pdf is incorrect , this font Does not support Chinese<strong>Can anyone tell me,when i use openoffice convert fonts how to set the default font? or Any other solutions</strong>I see in the package net.sf.jooreports.openoffice.converter;OpenOfficeDocumentConverter.java
private void loadAndExport(String inputUrl, String outputUrl, PropertyValue[] exportProperties) throws Exception {
XComponentLoader desktop = this.openOfficeConnection.getDesktop();
XComponent document;
if(!isTextUtf8() ){
PropertyValue propertyValues[]=new PropertyValue[]{property("ReadOnly",Boolean.TRUE),property("Hidden", Boolean.TRUE)};
document = desktop.loadComponentFromURL(inputUrl, "_blank", 0, propertyValues);
}else{
PropertyValue propertyValues[] = new PropertyValue[] {
property("ReadOnly", Boolean.TRUE),
property("FilterOptions", "utf8"),
property("FilterName", "Text (encoded)"),
property("UpdateDocModel", ONE),
property("Hidden", Boolean.TRUE) } ;
document = desktop.loadComponentFromURL(inputUrl, "_blank", 0, propertyValues);
}
refreshDocument(document);
try
{
XStorable storable = (XStorable)UnoRuntime.queryInterface(XStorable.class, document);
storable.storeToURL(outputUrl, exportProperties);// how to set default font ?
} finally {
document.dispose();
}
}