2015-09-20 5:15 GMT+02:00 chengangxiong :
> 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/**/
> importOptions, OutputStream outputStream, Map/**/
> exportOptions) throws Exception {
> XComponentLoader desktop =
> openOfficeConnection.getDesktop();
>
> Map/**/ 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/**/ 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
>
Please start a new thread if you have a question rather than hijack an
existing thread like this one.
Kind regards
Johnny Rosenberg
> >
> > Hi,
> >
> > I have been using Open Office for many years and have recommended you
>
Me? Oh, thanks man, you didn't have to do that… I'm just like most people
on this mailing list, an ordinary user like yourself. This is more like a
user-help-user thing, rather than a user-asks-questions-to-a-company thing.
> to many people and organisations.
> > One function I wish I could find with you is an e-mail program similar
> to MS Outlook Express.
>
This question has been asked a lot, really, a very lot of times on this
mailing list.
> >
> > If you have one please advise me how to get ti.
> > If you do not have one, how about it.
>
As far as I know there will never be one. I think the developers would
rather invest their time for correcting existing bugs and add new features
to the existing applications, than to create an entirely new one,
especially since there are a lot of good stuff out there that already does
the job just fine and work well with Apache OpenOffice. Thunderbird is
already mentioned, then we have Evolution and some other good stuff. Get
out there and have a look…! :)
Best regards
Johnny Rosenberg
> >
> > Best wishes from a fan,
> >
> > Ian Kirby.
>
>