| View previous topic :: View next topic |
| Author |
Message |
sb73542 Power User

Joined: 09 Aug 2005 Posts: 63
|
Posted: Tue Aug 09, 2005 6:14 am Post subject: Converting Document Formats Without Running soffice Binary? |
|
|
Hello,
I have been looking into running Linux on older computers with 32 - 64MB of RAM. Needless to say, OOo is essentially useless on these computers. It takes 5 - 15 **minutes** to load and is unbearably sluggish once it does load. The major functionality missing from the lightweight office programs for Linux (Abiword, Gnumeric, Koffice) is a reliable MS Office document converter. Is there any way that an external program can access just the libraries that OOo uses to convert formats, so that a file can be converted from the command line, thus creating a new file of the target format in a specified directory-- **without** firing up soffice.bin?
I did run across http://www.oooforum.org/forum/viewtopic.phtml?p=41636 but most of these examples still load up an invisible copy of soffice.bin.
This link: http://www.oooforum.org/forum/viewtopic.phtml?t=3451 looked promising, but I do not understand python all that well, nor the funtion of UNO. In general are there any solutions for converting to/from OOo formats and possibly also SWF and PDF by means of only a small subset of the full OOo suite?
Thanks for the help! |
|
| Back to top |
|
 |
ms777 Super User


Joined: 07 Feb 2004 Posts: 1355
|
Posted: Tue Aug 09, 2005 7:18 am Post subject: |
|
|
| Quote: | | Is there any way that an external program can access just the libraries that OOo uses to convert formats, so that a file can be converted from the command line, thus creating a new file of the target format in a specified directory-- **without** firing up soffice.bin? |
One of the more frequent questions here ... unfortunately, the answer is simple: no. |
|
| Back to top |
|
 |
sb73542 Power User

Joined: 09 Aug 2005 Posts: 63
|
Posted: Tue Aug 09, 2005 8:39 am Post subject: |
|
|
| Hmmm. bummer. The code isn't isolated into separate classes, so that a programmer could write his own program and just #include "OOconverter.h", so to speak? I'm not much of a programmer, but it seems to me that the code responsible for converting would be cleanly separated into a class so that it could accept an argument of type .doc being passed to it, and then return another object in the requested format. One would think that the class would be program agnostic, that is to say, should work whether it is integrated into OOo or whether it is included in my helloworld.cpp file. |
|
| Back to top |
|
 |
SergeM Super User

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

Joined: 03 Aug 2005 Posts: 2
|
Posted: Wed Aug 10, 2005 11:44 am Post subject: |
|
|
Hi,
This is exactly the functionality I am looking for... not to convert docs but to convert SXW files withouth running OO.
The problem is: I use Openoffice Writer as a report template creator for a web application. When I want to generate a report in PDF I open the template (content.xml), substitute some tags, save the document and then I need a conversor from SXW to PDF.
The only way I found was running OO in a framebuffer display, but I think it is like waking up a giant just to do a little task - it takes too long to get the document printed/converted by the web server.
It would be very nice if there was a command line script that could print or convert OO documents in other formats.
Regards,
Roger |
|
| Back to top |
|
 |
pmelab General User

Joined: 05 May 2005 Posts: 26
|
Posted: Mon Aug 15, 2005 11:56 pm Post subject: |
|
|
I need to perform nearly the same task. I need to convert dynamically created sxw files from within a java program.
If you ever find a solution, please let me know
philipp |
|
| Back to top |
|
 |
hol.sten Super User


Joined: 14 Nov 2004 Posts: 3532 Location: Hamburg, Germany
|
Posted: Tue Aug 16, 2005 1:04 am Post subject: |
|
|
| pmelab wrote: | I need to convert dynamically created sxw files from within a java program.
|
Two questions:
- Why is it impossible to use a running soffice application for converting th sxw files?
- Why do you create a sxw file dynamically? Isn't is possible to create a xsl-fo file instead? Java can handle that.
With kind regards
hol.sten |
|
| Back to top |
|
 |
pmelab General User

Joined: 05 May 2005 Posts: 26
|
Posted: Tue Aug 16, 2005 5:05 am Post subject: |
|
|
> - Why is it impossible to use a running soffice application for converting th sxw files?
Its not impossible, but I think its a lot of overhead. I used to call soffice from PHP, but I had problems with a lot of unpredictable errors. I think a seamless integration in a java program would be more efficient and stable.
> - Why do you create a sxw file dynamically? Isn't is possible to create a xsl-fo file instead? Java can handle that.
I need to provide different Layouts for different customers. And every Layout has to be available in as many formats as possible (.sxw, .pdf, .doc, .rtf ...). So I use OpenOffice documents as the least common denominator and convert them. This way I only have to implement each layout once. The same way I create Spreadsheets an Presentations.
As far as I know XSL-FO isnt able to produce MS Excel Spreadsheets and MS Word Documents with charts.
As a long term target I'm dreaming of integrating document conversion into an Cocoon-Serializer, so i can feed openoffice directly from the SAX-Stream.
regards, philipp |
|
| Back to top |
|
 |
Cybb20 Super User


Joined: 02 Mar 2004 Posts: 1569 Location: Frankfurt, Germany
|
Posted: Wed Aug 17, 2005 3:26 pm Post subject: |
|
|
I understand your requests in this functionality, having a lightweight base of OOo that can only do conversions and takes up small amount of memory and has a very fast startup -> better performance as the bulky and big OOo app.
As one already said, such a set cannot be split easily from OOo and there are a lot of things needed, not just a simple header file.
If it would have been easy there surely would have been such a converter.
I can see what I can find out, it is a very good idea to have something like this but it will surely take quite some effort and the development team has more urgent things to care about. As always said: Third party developers are welcome .
Christian _________________ - Knowledge is Power - |
|
| Back to top |
|
 |
|