OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

OpenOffice Java API and Office messages

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> General Discussion
View previous topic :: View next topic  
Author Message
Guest






PostPosted: Thu Jun 19, 2003 8:27 am    Post subject: OpenOffice Java API and Office messages Reply with quote

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





PostPosted: Mon Jun 30, 2003 9:18 am    Post subject: Reply with quote

How do you convert XML output to HTML ?
Do you use an XSL file ?

Regards,
Back to top
steveclewer
Guest





PostPosted: Tue Jul 01, 2003 5:00 am    Post subject: converter Reply with quote

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





PostPosted: Wed Jul 02, 2003 5:52 am    Post subject: informations Reply with quote

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
OOo Enthusiast


Joined: 28 Jun 2003
Posts: 106
Location: Switzerland

PostPosted: Wed Jul 02, 2003 7:14 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> General Discussion All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group