Looking for a code portion: import/export document formats
mstahl at redhat.com
Mon Aug 13 02:52:53 PDT 2012
On 13/08/12 11:26, docminer wrote:
> 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
> 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:
there is a simple example program that prints documents from Python:
More information about the LibreOffice