03-21-2013 09:07 PM
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();
}
}
03-21-2013 09:17 PM
03-25-2013 11:01 PM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.