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

Document Conversion System Woes

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API
View previous topic :: View next topic  
Author Message
Bitwise
Newbie
Newbie


Joined: 04 May 2006
Posts: 2
Location: Eugene, Oregon

PostPosted: Thu May 04, 2006 8:25 am    Post subject: Document Conversion System Woes Reply with quote

I am working on an online document conversion system using OpenOffice as the engine. Most of the documents we receive are MS Word, and the majority are converted perfectly. A small amount of them cause the OpenOffice instance running to take up all system resources, hang and not respond.

I have coded both a macro and C++/UNO program to do the task, and while the C++ program catches more of the errors, there are still a few key documents that cause it problems. No exceptions are raised. When i view the graphical output when trying to load these documents, the program window is just blank.

The program hangs when I call loadComponentFromURL in both the Basic macro and the C++ app. I am having a difficult time finding a complete set of MediaDescriptors, so I am not sure if there is a remedy with those settings.

I don't need the system to be able to convert every single document. What I need is for the program to give up gracefully at the right time.
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
hol.sten
Super User
Super User


Joined: 14 Nov 2004
Posts: 3533
Location: Hamburg, Germany

PostPosted: Thu May 04, 2006 8:55 am    Post subject: Re: Document Conversion System Woes Reply with quote

Bitwise wrote:
What I need is for the program to give up gracefully at the right time.

I don't think that OOo provides a function for this. I have no knowledge of C++ and OOo Basic, so I solved this problem in Java myself. I wrote a supervisor thread which kills and restarts OOo if the conversion of a OOo file to pdf lasts suspiciously long. With this the pdf conversion application runs quite good.

With kind regards
hol.sten
Back to top
View user's profile Send private message
SergeM
Super User
Super User


Joined: 09 Sep 2003
Posts: 3211
Location: Troyes France

PostPosted: Fri May 05, 2006 9:12 am    Post subject: Reply with quote

Quote:
The program hangs when I call loadComponentFromURL in both the Basic macro and the C++ app

Is it the same document you load in both context C++/OOoBasic ?
_________________
Linux & Windows OOo3.0
UNO & C++ : WIKI
http://wiki.services.openoffice.org/wiki/Using_Cpp_with_the_OOo_SDK
In French
http://wiki.services.openoffice.org/wiki/Documentation/FR/Cpp_Guide
Back to top
View user's profile Send private message Visit poster's website
Bitwise
Newbie
Newbie


Joined: 04 May 2006
Posts: 2
Location: Eugene, Oregon

PostPosted: Fri May 05, 2006 10:34 am    Post subject: six and one half dozen, the other Reply with quote

Yes, i have a handful of test documents that have choked the system, and i test both solutions with those.

I have also noticed, and perhaps this is a resource issue, that i cannot convert two documents at once.

My current strategy is set up a conversion queue. I had the same idea as hol.sten, to set a watch thread, and time out if needs be. I have implemented this in a bash script, running the conversion as a background process. It dies rather gracefully.

I did some research on setting up a M$ server with some of the readily available word doc conversion software, and discovered that they all depend on a printer driver to convert to pdf, so none of them can handle more than one document at a time, either. Not to mention the small fortune people want for that stuff.

I'll stick with the open source.
_________________
...perhaps if i wave this prop and technobabble at it for a moment, i can formulate a plot device...
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API 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