Export wiki pages as OpenDocument (.odt) files


This plugin adds an OpenDocument link at the bottom of Wiki pages, under the Download in other formats: heading. This allows you to download the page in OpenDocument format for further editing or distribution.

Bugs/Feature Requests

Existing bugs and feature requests for PageToOdtPlugin are here.

If you have any issues, create a new ticket.


5 / 9


0 / 1


1 / 4

Known limitations

  • No support for exporting images.
  • Internal Trac links are not working, see #2065.


Download the zipped source from here.


You can check out PageToOdtPlugin from here using Subversion, or browse the source with Trac.


The plugin uses the cElementTree Python module and not the standard elementtree. If you are using Python 2.4, make sure it is installed. On Debian/Ubuntu systems you can use apt-get install python-celementtree.

General instructions on installing Trac plugins can be found on the TracPlugins page.

To enable the plugin, add the following to your trac.ini file:

pagetoodt.* = enabled


The configuration of the plugin and the template odt file are read from a wiki page, PageToOdtStyles. This page must exist for the plugin to work. Its content is a key/value pair list defining what attached file to use as a template and what predefined styles to use. Below is an example for the French version of OpenOffice:

style_standard = Corps de texte
style_heading_1 = Titre 1
style_heading_2 = Titre 2
style_heading_3 = Titre 3
style_heading_4 = Titre 4
style_heading_5 = Titre 5
style_heading_6 = Titre 6
style_heading_7 = Titre 7

style_unordered_list = Puce 1

style_ordered_list = Numérotation 1

style_inline = Texte source
style_bold = Accentuation forte
style_italic = Accentuation
style_bolditalic = Accentuation forte

template = empty.odt

If using the English version, here is a template, contributed by JasonWinnebeck:

style_standard = Text body
style_heading_1 = Heading 1
style_heading_2 = Heading 2
style_heading_3 = Heading 3
style_heading_4 = Heading 4
style_heading_5 = Heading 5
style_heading_6 = Heading 6
style_heading_7 = Heading 7

style_unordered_list = List 1

style_ordered_list = Numbering 1

style_inline = Source Text
style_bold = Strong Emphasis
style_italic = Emphasis
style_bolditalic = Strong Emphasis

template = empty.odt

You also need to attach a file empty.odt to that page. You can create this file by creating a new OOo Writer document and saving the blank document as empty.odt, and then attaching it to the page. Because the default OOo template does not have a built-in style for bold+italic, the examples above map bold+italic to just bold. You could create such a style (or any other styles) before saving the empty.odt.

Recent Changes

16510 by rjollos on 2017-04-16 01:10:47
Fix indentation
3314 by cdevienne on 2008-03-05 21:20:19
Disable a debugging purpose feature which make win32 deployment fail. This fix #2160.
2650 by cdevienne on 2007-09-22 08:19:54
Applied patch #1736


Author: cdevienne
Maintainer: Christophe de Vienne

Last modified 3 years ago Last modified on Nov 28, 2016, 11:33:53 PM