I do not think you can leverage the OOo filters without OOo running. Even if you use an UNO service, OOo will have to be running.
As Eric mentioned, you can use XSLT to extract the text from ODF documents without running OOo. But you will need to run OOo if you want to convert other formats like MS Office to ODF. A plus of using UNO, you can use OOo in the background and the user does not have to go into OpenOffice to run your utility. Good luck. Garnett -----Original Message----- From: Éric Bischoff [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 18, 2006 8:49 AM To: [email protected] Subject: Re: [dev] Command-line document converter Le Mercredi 18 Octobre 2006 11:26, Ernst . a écrit : > Hi, > > I want to build a command-line tool that reads files in several file > formats and outputs a plain text file. OOo reads many formats, including MS > Word and its own OpenDocument. The plain text file is used to for a search > index (i need to extract the words from a document, not the format). > > It is possible to create a macro to convert a document, but starting the > office seems a large overkill to me and may cause problems when running on > a server. > I searched the source of OOo and found two modules (or parts of the > program) related to file filters. The first one is in the sw source folder. > The class SwDocShell (/sw/inc/docsh.hxx) has read and save methods. This > class is using the so3 module (especially the SvStorage class), which is > deprecated. As a second part of the program, there must be an UNO service > available (capable of converting documents), but i haven't yet found this > service. > > My question is, is it possible to use the filters of OOo, without starting > the office? And, if so, can i use the sw and so3 module directly, or should > i use some UNO service or object? I don't if that works with built-in filters (probably yes), but for sure you can use a XSLT engine like the one provided by libxslt, be it with your own style sheets or with those filters. -- Les bonnes choses de la vie sont illégales, amorales ou font grossir. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
