PyOpenOffice 0.31

Process OpenOffice.org Writer Files and transform them to PDF without installing OpenOffice.org

back to the main page of the author

nussknacker
Advent and Christmas Season
in the Ore Mountains
("Erzgebirge"), Saxony



High Tech in Saxony





Test it "live" on this server.

Have a look at a reference implementation using PyOpenOffice: "Bezirksreiter" - open source software for church administration (member and donation tracking, accounting, reporting and statistics). Sorry - it's only available in German (who will help to port it to other languages?). Login as "Benutzername" = "Onkel_Otto" and "Passwort" = "12345".

This tool is dedicated to the developers of OpenOffice.orgPython, the Reportlab Toolkit and the Python Imaging Library. They did a great job and I admire them for their programming skills.

FAQ:

What is PyOpenOffice?

What can PyOpenOffice do for you?

At what stage of development is PyOpenOffice now?

What license has PyOpenOffice?

What software is required?

What are the principles behind PyOpenOffice?

Usage

Task
PyOpenOffice Instance
Command Line Interface
Serial Letter or Report - Save as one File newfile  = tool.makeSerialLetters(templatefile,replace_listofdicts,one_file=1,
[replace_fixeddict=defaultkeywords, content="", data_with_linebreaks=0, transform_linebreaks=0])
not implemented yet
Serial Letter or Report - Save as many Files
tool.makeSerialLetters(templatefile,replace_listofdicts,one_file=0,
[replace_fixeddict=defaultkeywords, content="", data_with_linebreaks=0, transform_linebreaks=0])
not implemented yet
Read the content.xml file of an SXW archive
utf8_encoded_content = tool.extractContentXml(sourcefile)
not implemented yet
Replace paragraphs with OO linebreaks by a list of paragraphs
tool.transformLinebreaks(sourcefile)
not implemented yet
Replace Pictures - Save as new SXW file
newfile = tool.replacePictures(templatefile,list_of_picture_files)
not implemented yet
Plain Text Extract - Save as PDF
tool.makePlainText(filenameOrList_of_filenames, plain_text_output=0)
not implemented yet
Plain Text Extract - Save as cp1252-Plain-Text
tool.makePlainText(filenameOrList_of_filenames, plain_text_output=1) not implemented yet
Transform SXW to PDF
list_of_outfiles = tool.makeSafePdf(filenameOrList_of_filenames)
python pyopenoffice.py filename
Serial Letter or Report - Save as PDF
use first tool.makeSerialLetters(...), then tool.makeSafePdf(...)
not implemented yet
List all Temporary Files generated since last cleanup
list_of_tempfiles = tool.listTempfiles()
not implemented yet
Clean up all Temporary Files generated by PyOpenOffice
tool.cleanTempfiles()
python pyopenoffice -cleanup

Restrictions and Known Bugs

The serial letter function does not have many known restrictions:
PDF transformation: PyOpenOffice is intentionally not a WYSIWYG tool! The transforming to PDF is very simple compared with the built-in function of OO - but have you ever tried to install OO on a webserver to deliver PDF's? You need an X-Server or a VNC-Server, vast amount of harddisk space - and you need the approval by your webhoster... Here the restrictions:

Release History


Last but not least: Please, tell me other bugs, make suggestions - or contribute your own code to improve this library!
Mail: me.simon@web.de

back to the main page of the author