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

Converting Document Formats Without Running soffice Binary?

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


Joined: 09 Aug 2005
Posts: 63

PostPosted: Tue Aug 09, 2005 6:14 am    Post subject: Converting Document Formats Without Running soffice Binary? Reply with quote

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
View user's profile Send private message Visit poster's website
ms777
Super User
Super User


Joined: 07 Feb 2004
Posts: 1355

PostPosted: Tue Aug 09, 2005 7:18 am    Post subject: Reply with quote

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
View user's profile Send private message
sb73542
Power User
Power User


Joined: 09 Aug 2005
Posts: 63

PostPosted: Tue Aug 09, 2005 8:39 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
SergeM
Super User
Super User


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

PostPosted: Wed Aug 10, 2005 9:11 am    Post subject: Reply with quote

You describe a procedural view not an object view.
Format conversion is from other services dependant for instance iostream services ...
It's not so easy as one could thing at first.
_________________
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
infroger
Newbie
Newbie


Joined: 03 Aug 2005
Posts: 2

PostPosted: Wed Aug 10, 2005 11:44 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
pmelab
General User
General User


Joined: 05 May 2005
Posts: 26

PostPosted: Mon Aug 15, 2005 11:56 pm    Post subject: Reply with quote

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 Very Happy

philipp
Back to top
View user's profile Send private message
hol.sten
Super User
Super User


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

PostPosted: Tue Aug 16, 2005 1:04 am    Post subject: Reply with quote

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
View user's profile Send private message
pmelab
General User
General User


Joined: 05 May 2005
Posts: 26

PostPosted: Tue Aug 16, 2005 5:05 am    Post subject: Reply with quote

> - 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
View user's profile Send private message
Cybb20
Super User
Super User


Joined: 02 Mar 2004
Posts: 1569
Location: Frankfurt, Germany

PostPosted: Wed Aug 17, 2005 3:26 pm    Post subject: Reply with quote

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 Smile.

Christian
_________________
- Knowledge is Power -
Back to top
View user's profile Send private message Send e-mail
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