| View previous topic :: View next topic |
| Author |
Message |
Guest
|
Posted: Thu Jun 19, 2003 8:27 am Post subject: OpenOffice Java API and Office messages |
|
|
Hi,
I am developing a converter that takes Word docs and converts them to HTML using the OpenOffice Java API. The code is based around the document converter exaple in the API description. A user submits the document via a php page, which then executes the Java to call OOo.
Mostly, this works fine. However, some times when I'm converting a document, OOo pops up a message on the server machine, which remote users cannot see. The process then just hangs, from their point of view. How can i capture what is going on in the OOo processing, get these messages and take appropriate action?
Any help gratefully appreciated. |
|
| Back to top |
|
 |
prospere Guest
|
Posted: Mon Jun 30, 2003 9:18 am Post subject: |
|
|
How do you convert XML output to HTML ?
Do you use an XSL file ?
Regards, |
|
| Back to top |
|
 |
steveclewer Guest
|
Posted: Tue Jul 01, 2003 5:00 am Post subject: converter |
|
|
My conversion is based around the DocumentSaver.java code which is given as an example of a conversion using the OOo Java APIs. In addition to this I use HTML Tidy (http://tidy.sourceforge.net/) as a JAR file to tidy up the output HTML.
The only trouble is when OOO throws up a dialog which requires an 'OK' from the user (e.g. when a character is in an unrecognised encoding). Since OOo cannot be seen by the person using the converter, there is no way that they can click this button, and the whole thing hangs.
What I want is a way to autoclick these dialogs, or even better supress them entirely.
Any help gratefuly accepted.
Steve |
|
| Back to top |
|
 |
prospere Guest
|
Posted: Wed Jul 02, 2003 5:52 am Post subject: informations |
|
|
in fact, this subject interest me. I must do a conversion .doc -> HTML. And I pass by OpenOffice (with ConverterServlet.java). So I obtain XML files...
But the translation XML ->HTML is very complexe. How do you do this conversion XML->HTML? Do you use an existing file? Is it possible to have this file?
Thanks, |
|
| Back to top |
|
 |
openmind OOo Enthusiast


Joined: 28 Jun 2003 Posts: 106 Location: Switzerland
|
Posted: Wed Jul 02, 2003 7:14 am Post subject: |
|
|
Look at this example script from the scripting project. Its written in beanshell but should be thinked in other scripting languages (OOBasic, JavaScript) as well. The example exports a writer document to html. Maybe it will include some hints for you.
Note: Script is released for the 1.1beta2 and may use a changed api to 1.0.x. Easiest thing would be to download the beta.
http://framework.openoffice.org/scripting/utilities-download.html#Export_To_HTML |
|
| Back to top |
|
 |
|