| View previous topic :: View next topic |
| Author |
Message |
Bitwise Newbie

Joined: 04 May 2006 Posts: 2 Location: Eugene, Oregon
|
Posted: Thu May 04, 2006 8:25 am Post subject: Document Conversion System Woes |
|
|
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 |
|
 |
hol.sten Super User


Joined: 14 Nov 2004 Posts: 3533 Location: Hamburg, Germany
|
Posted: Thu May 04, 2006 8:55 am Post subject: Re: Document Conversion System Woes |
|
|
| 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 |
|
 |
SergeM Super User

Joined: 09 Sep 2003 Posts: 3211 Location: Troyes France
|
|
| Back to top |
|
 |
Bitwise Newbie

Joined: 04 May 2006 Posts: 2 Location: Eugene, Oregon
|
Posted: Fri May 05, 2006 10:34 am Post subject: six and one half dozen, the other |
|
|
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 |
|
 |
|