Re: [api-dev] Java storeAsURL PDF Problem

2006-01-02 Thread Laurent Godard

Hi Mathias,


i try to export a writer document (odt) to PDF. Here is the code:

try {
xStorable.storeAsURL(pdfUrl, propertyValues);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}


you have to use storeToURL as PDF format is not editable by OOo

Laurent


--
Laurent Godard [EMAIL PROTECTED] - Ingénierie OpenOffice.org
Indesko  http://www.indesko.com
Nuxeo CPS  http://www.nuxeo.com - http://www.cps-project.org
Livre Programmation OpenOffice.org, Eyrolles 2004

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [api-dev] Java storeAsURL PDF Problem

2006-01-02 Thread Matthias Scholz

Laurent Godard schrieb:


Hi Mathias,


i try to export a writer document (odt) to PDF. Here is the code:

try {
xStorable.storeAsURL(pdfUrl, propertyValues);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}



you have to use storeToURL as PDF format is not editable by OOo


It runs, thank you!

Matthias



Laurent





--

-
Stadt Mansfeld

Lutherstraße 9
06343 Mansfeld


Öffnungszeiten:
Dienstag9 - 12 Uhr  13 - 18 Uhr
Donnerstag  9 - 12 Uhr  13 - 15 Uhr
Freitag 9 - 12 Uhr  


Telefon:+49 34782 8710
Fax:+49 34782 87122
E-Mail: [EMAIL PROTECTED]
WorldWideWeb:   www.stadtverwaltung-mansfeld.de
-


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [api-dev] Java storeAsURL PDF Problem

2006-01-02 Thread Christian Junker
This makes me think if we should add a note to the storeAsURL method
description.
http://api.openoffice.org/docs/common/ref/com/sun/star/frame/XStorable.html#storeAsURL

Like so:
NOTE - saving of document formats that cannot be edited but only
exported like PDF should be done with storeToURL only.

What do others think?

--
Best Regards
Christian Junker

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [api-dev] Java storeAsURL PDF Problem

2006-01-02 Thread Laurent Godard

Hi christian,


Like so:
NOTE - saving of document formats that cannot be edited but only
exported like PDF should be done with storeToURL only.

What do others think?


it is explicit and will save a FAQ
i would say yes

Laurent

--
Laurent Godard [EMAIL PROTECTED] - Ingénierie OpenOffice.org
Indesko  http://www.indesko.com
Nuxeo CPS  http://www.nuxeo.com - http://www.cps-project.org
Livre Programmation OpenOffice.org, Eyrolles 2004

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[api-dev] Java storeAsURL PDF Problem

2006-01-01 Thread Matthias Scholz

Hello,

i try to export a writer document (odt) to PDF. Here is the code:

--- snip ---
propertyValues = new com.sun.star.beans.PropertyValue[2];
// Setting the flag for overwriting
propertyValues[0] = new com.sun.star.beans.PropertyValue();
propertyValues[0].Name = Overwrite;
propertyValues[0].Value = new Boolean(true);
// Setting the filter name
propertyValues[1] = new com.sun.star.beans.PropertyValue();
propertyValues[1].Name = FilterName;
propertyValues[1].Value = writer_pdf_Export; // :-(
// propertyValues[1].Value = HTML (StarWriter); // :-)
// propertyValues[1].Value = StarOffice XML (Writer); // :-)
// propertyValues[1].Value = Rich Text Format; // :-)
// propertyValues[1].Value = writer8; // :-)

try {
xStorable.storeAsURL(pdfUrl, propertyValues);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
--- snap ---

If i set the FilterName property to writer_pdf_Export, i get an exception:

--- snip ---
com.sun.star.task.ErrorCodeIOException:
at
com.sun.star.lib.uno.environments.remote.Job.remoteUnoRequestRaisedException(Job.java:275)
at com.sun.star.lib.uno.environments.remote.Job.execute(Job.java:141)
at
com.sun.star.lib.uno.environments.remote.JobQueue.enter(JobQueue.java:377)
at
com.sun.star.lib.uno.environments.remote.JobQueue.enter(JobQueue.java:346)
at
com.sun.star.lib.uno.environments.remote.JavaThreadPool.enter(JavaThreadPool.java:106)
at
com.sun.star.lib.uno.bridges.java_remote.java_remote_bridge.sendRequest(java_remote_bridge.java:845)
at
com.sun.star.lib.uno.bridges.java_remote.java_remote_bridge.sendRequest(java_remote_bridge.java:794)
at
com.sun.star.lib.uno.bridges.java_remote.ProxyFactory$Handler.request(ProxyFactory.java:151)
at
com.sun.star.lib.uno.bridges.java_remote.ProxyFactory$Handler.invoke(ProxyFactory.java:137)
at $Proxy5.storeAsURL(Unknown Source)
at de.jammerhund.oob.test.OOo2pdf.main(OOo2pdf.java:89)
--- snap ---

If i use some other filters (see above), then it runs. Can anybody helb me?

And generally, someone knows documentation about the possible filter names?

I use OO 2.0.1 and Java 1.5.0_01-b08.

I wish all of you a happy new year!

Matthias

--

-
 Stadt Mansfeld

 Lutherstraße 9
 06343 Mansfeld


 Öffnungszeiten:
 Dienstag   9 - 12 Uhr  13 - 18 Uhr
 Donnerstag 9 - 12 Uhr  13 - 15 Uhr
 Freitag9 - 12 Uhr  


 Telefon:   +49 34782 8710
 Fax:   +49 34782 87122
 E-Mail:[EMAIL PROTECTED]
 WorldWideWeb:  www.stadtverwaltung-mansfeld.de
-



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]