Looking for a code portion: import/export document formats
Michael Stahl
mstahl at redhat.com
Mon Aug 13 02:52:53 PDT 2012
On 13/08/12 11:26, docminer wrote:
> Hi,
>
> I want to re-use in other project the LibreOffice's document transformation
> features. For example, read a MS Word document and save it as Adobe PDF
> file.
>
> I've downloaded the source codes and looked at them, but LO is a very large
> project. Where I can found those sources?
the document conversion engines in LibreOffice are called Writer, Calc,
Draw and Impress. conversion from e.g. DOCX to ODT happens by importing
the DOCX file with the DOCX import filter into Writer, and then
exporting the document from Writer with the ODF export filter.
the best option of using LibreOffice for your purpose is to install it
and connect to it via UNO; read the OOo Dev Guide for details:
http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/FirstSteps/First_Contact
there is a simple example program that prints documents from Python:
http://cgit.freedesktop.org/libreoffice/core/tree/bin/convwatch.py
More information about the LibreOffice
mailing list