AnsweredAssumed Answered

under linux Preview Chinese font is incorrect

Question asked by fanhuibin1 on Mar 22, 2013
Latest reply on Mar 26, 2013 by binerf
when i try to Transform <strong> text into pdf </strong>
1.configed use openoffice as  default Converter
2.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;

  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);
       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);
      XStorable storable = (XStorable)UnoRuntime.queryInterface(XStorable.class, document);
      storable.storeToURL(outputUrl, exportProperties);// how to set default font ?
    } finally {