[[PageOutline(2-5,Contents,pullout)]] = Export wiki pages to PDF, ODT and DOC format == Description This plugin allows you to export wiki pages to PDF, ODT and DOC format. This plugin is licensed under LGPL. == Bugs/Feature Requests Existing bugs and feature requests for WikiExportPlugin are [report:9?COMPONENT=WikiExportPlugin here]. If you have any issues, create a [/newticket?component=WikiExportPlugin new ticket]. [[TicketQuery(component=WikiExportPlugin&group=type,format=progress)]] == Download Download the zipped source from [export:wikiexportplugin here]. == Source You can check out WikiExportPlugin from [/svn/wikiexportplugin here] using Subversion, or [source:wikiexportplugin browse the source] with Trac. == Installation and Configuration This plugin has been developed with '''python-uno''' 2.4.1, '''[http://www.crummy.com/software/BeautifulSoup/ BeautifulSoup]''' 3.0.7a and '''python-imaging-library (PIL)'''. '''Note''': The plugin has been tested with !OpenOffice 3.2, Python UNO 3.2 and Trac 0.12.1 and works as designed. Python-uno is not installed by default. The exact installation instruction depend on the operating system you are using: * Linux: If your Linux uses apt, you can install python-uno as follows: {{{#!sh apt-get install python-uno python-beautifulsoup python-imaging }}} * With Debian Lenny 5.0, if you want to run '''soffice''' with `-headless` option, install these packages also: {{{#!sh apt-get install openoffice.org openoffice.org-headless openoffice.org-java-common }}} * Mac: I can't install python-uno on Mac OS. * Windows: The following article can be useful: http://wiki.services.openoffice.org/wiki/Using_Python_on_Windows Before use, you must start Open Office in service mode. To start Office in this mode, use a command like this: {{{#!sh soffice "-accept=socket,host=localhost,port=8100;urp;" -headless (1) soffice -accept=socket,host=localhost,port=8100;urp;StarOffice.ServiceManager (2) }}} The version of Open Office used in the development of the plugin was the 2.4. * '''(1)''' Openoffice 2.4 with headless without framebuffer. * '''(2)''' Standard Openoffice server with X == Example A possible configuration of this plugin is the following: {{{#!ini [openOffice-exporter] user = john psswrd = 1234 host = localhost port = 8100 para-styles = Text Body, Default, Heading 1, Heading 2, Heading 3, ..., Heading 10 list-styles = List 1, Numbering 1, Numbering 2, Numbering 3 char-styles = Default, Source Text, Internet Link isPersonalizeAttribute = False }}} A brief description of the fields: * '''user''' and '''psswrd''': If the trac project needs authentication, for export the images you need to pass a user and a password for construct a url that urllib can open. * '''host''' and '''port''': When you start the soffice in service mode, you must specify a host and a port where the service accepts the connections. By default in this plugin, these values are localhost and 8100. * '''para-styles''', '''list-styles''' and '''char-styles''': Are the styles that you want to use of the open office to export the wiki pages. All these fields are optional, but the default configuration of this plugin is for the Spanish version of Open Office. When this plugin is active, the following options appear in the wiki pages: [[Image(wikiexport.png)]] Since r5057, this plugin accepts a basic template system. This system works as follows: 1. Create a wiki page called '''!WikiTemplateConf''' 1. Adds to that page a text similar to the next: {{{ {{{ template_list= .+, Manual, List template_file= default.odt, manual.odt, list.odt }}} }}} 1. template_list, regular expresion of wikipagenames. 1. template_file, template file apply to wikipage. 1. Attach to the page the files default.odt, manual.odt, list.odt (or those who have written in the template_file section) Once this is done, when you export a wiki page, if the page name starts with a name written in the template_list section, the document created use the template defined in the '''!WikiTemplateConf''' page. === Caveats The listed values must be separated by both a comma and a space: {{{ styles = Default, Heading 1, Heading 2 Works fine styles = Default,Heading 1,Heading 2 Doesn't work }}} == Recent Changes [[ChangeLog(wikiexportplugin, 3)]] == Author/Contributors '''Author:''' [wiki:sfhynx] [[BR]] '''Maintainer:''' [[Maintainer]] [[BR]] '''Contributors:''' [wiki:clp]