when I convert a excel to pdf.DocumentConverter converter = new StreamOpenOfficeDocumentConverter(connection); converter.convert(inputFile, stw, outputFile, pdf);a problem occured on the below place.it throws exception conversion failed: input document is null after loading and i dont know how to resolve it .and in another server the code runs OK. and I cant find the sourcecode of unoil.jar and ridl.jar .so I cant do further debug. please help me .thank you very much.private void loadAndExport(InputStream inputStream, Map/*<String,Object>*/ importOptions, OutputStream outputStream, Map/*<String,Object>*/ exportOptions) throws Exception { XComponentLoader desktop = openOfficeConnection.getDesktop(); Map/*<String,Object>*/ loadProperties = new HashMap(); loadProperties.putAll(getDefaultLoadProperties()); loadProperties.putAll(importOptions); // doesn't work using InputStreamToXInputStreamAdapter; probably because it's not XSeekable //property("InputStream", new InputStreamToXInputStreamAdapter(inputStream)) loadProperties.put("InputStream", new ByteArrayToXInputStreamAdapter(IOUtils.toByteArray(inputStream))); XComponent document = desktop.loadComponentFromURL("private:stream", "_blank", 0, toPropertyValues(loadProperties)); if (document == null) { throw new OpenOfficeException("conversion failed: input document is null after loading"); }
refreshDocument(document); Map/*<String,Object>*/ storeProperties = new HashMap(); storeProperties.putAll(exportOptions); storeProperties.put("OutputStream", new OutputStreamToXOutputStreamAdapter(outputStream)); try { XStorable storable = (XStorable) UnoRuntime.queryInterface(XStorable.class, document); storable.storeToURL("private:stream", toPropertyValues(storeProperties)); } finally { document.dispose(); } }> From: ian5ki...@btinternet.com > To: users@openoffice.apache.org > CC: ian5ki...@btinternet.com > Subject: Do you have? > Date: Sat, 19 Sep 2015 22:38:09 +0100 > > Hi, > > I have been using Open Office for many years and have recommended you to many > people and organisations. > One function I wish I could find with you is an e-mail program similar to MS > Outlook Express. > > If you have one please advise me how to get ti. > If you do not have one, how about it. > > Best wishes from a fan, > > Ian Kirby.