You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@openoffice.apache.org by Ian Kirby <ia...@btinternet.com> on 2015/09/19 23:38:09 UTC

Do you have?

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.

Re: Do you have?

Posted by Johnny Rosenberg <gu...@gmail.com>.
2015-09-20 5:15 GMT+02:00 chengangxiong <ch...@outlook.com>:

> 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: ian5kirby@btinternet.com
> > To: users@openoffice.apache.org
> > CC: ian5kirby@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.
>
>

Re: Do you have?

Posted by Oliver Brinzing <Ol...@gmx.de>.
Hi,

Am 20.09.2015 um 05:15 schrieb chengangxiong:
> it throws exception conversion failed: input document is null after loading

the following code works for me:

		XInputStream inputStream = null;

		try {
			final InputStream inputFile = new BufferedInputStream(
					new FileInputStream(sUrl));

			final ByteArrayOutputStream bytes = new ByteArrayOutputStream();
			final byte[] byteBuffer = new byte[4096];
			int byteBufferLength = 0;
			while ((byteBufferLength = inputFile.read(byteBuffer)) > 0)
				bytes.write(byteBuffer, 0, byteBufferLength);
			inputFile.close();

			// com.sun.star.lib.uno.adapter.ByteArrayToXInputStreamAdapter
			inputStream = new ByteArrayToXInputStreamAdapter(
					bytes.toByteArray());

		} catch (java.io.IOException e) {
			e.printStackTrace();
		}

Regards
Oliver

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@openoffice.apache.org
For additional commands, e-mail: users-help@openoffice.apache.org


RE: Do you have?

Posted by chengangxiong <ch...@outlook.com>.
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: ian5kirby@btinternet.com
> To: users@openoffice.apache.org
> CC: ian5kirby@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.
 		 	   		  

Re: Do you have?

Posted by James Knott <ja...@rogers.com>.
On 09/19/2015 05:38 PM, Ian Kirby wrote:
> 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.
>
>

Many people use Thunderbird.

BTW, I have to use Outlook at work and find it to be a piece of crap,
compared to Thunderbird.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@openoffice.apache.org
For additional commands, e-mail: users-help@openoffice.apache.org