It's better when it's simple

User Tools

Site Tools



This shows you the differences between two versions of the page.

Link to this comparison view

-Both sides previous revisionPrevious revision
Next revision
-plugin:odt [2013-01-28 16:04] Klap-in
+Previous revision
Both sides next revision
+plugin:odt [2020-09-02 21:41] (current) LarsDW223 Compatible to Hogfather
@@ Line -1,47 +1,47 @@ removed created
 ====== Export ======
 ---- plugin ----
 description: Exports a page to the Open Document format used by and other word processors
 author     : Andreas Gohr, Aurélien Bompard, Florian Lamml, Lars (LarsDW223) 
 email      :,,
 type       : render, syntax
 lastupdate : 20102019-1007-3027 
 compatible : 2007Detritus, 2016-06-26 and later"Elenor Of Tsort", 2017-02-19a "Frusterick Manners", "Greebo", Hogfather
 depends    : 
 conflicts header2
 similar    : 
 tags       : export, odt, pdf
 downloadurl: httphttps://aureliengithub.bompard.orgcom/projects/filesLarsGit223/dokuwiki-plugin-odt/dokuwikiarchive/ 
 sourcerepo : httphttps://gitoriousgithub.orgcom/LarsGit223/dokuwiki-plugin-odt 
 bugtracker : httphttps://aureliengithub.bompard.orgcom/projectsLarsGit223/dokuwiki-plugin-odt/issues 
 donationurl: http 
 screenshot_img :
 This plugin allows you to export a page to the [[wp>OpenDocument]] format used by [[|]], [[|]] and other word processors. This is especially useful when you need to print or to give a single page to a customer (Hint: can also export to PDF). Since release version 2016-04-23 a page can also directly be exported to and downloaded as PDF. See section [[#PDF conversion]] for details.
 This plugin was initialized by [[|Andreas Gohr]], and is now was then further developed and maintained by [[|Aurelien Bompard]]. If you have any requests (bugs, features, etc.), please use The older version of ODT plugin with default template support is from [[http://aurelienwww.bompardflorian-lamml.orgde/projects|Florian Lamml]]. Currently, the ODT plugin is maintained by [[|the plugin's trackerLarsDW223]], the author does not monitor this page.
 ===== Requirements =====
 ==== = Download =PHP ====
 PHP 5.5 (for PHP 5.3.3+ and PHP 5.4.X, see [[http|{{ http:odt/issues/|Flattr this }}workaround]]).
 Latest Users of PHP 7 might consider updating to release : [[|]] 23 or newer to prevent that their logfiles run full with meaningless errors ([[|PHP 7 signature ]]errors).
 Changes:==== DokuWiki ==== 
    * Bugfixes 
    * Table rowspan support (closes: [[http:/The current release of this plugin is backwards compatible up to/ DokuWiki release 2015-odt/ticket/4|#4]])08-10 "Detritus". 
    :!: All releases starting with 2016-09-10 and older are *Ukrainian translation *incompatible** with the next DokuWiki release "Frusterick Manners" (by Oleksiy Zagorskyi) 
     file *Remove empty paragraphs from output 
     *Download external imagesinc/ZipLib.class.php** is missing). :!:
 Older releases are available [[|on this webpage]].==== Plugins ====
 The development can be [[|tracked on Gitorious]]There are no requirements in general but some features have requirements:
 {{rss>http  * Bookcreator//gitoriousfor bookcreator support you need to install the [[plugin:bookcreator|Bookcreator Plugin]] 
   * Pagebreak: to be able to insert pagebreaks manually you need to install the [[plugin:pagebreak|Pagebreak Plugin]] too.atom date}} 
 This plugin works with DokuWiki 2007-06-26 and later.
 ===== Usage =====
@@ Line -50,29 +50,239 @@ removed created
 A better way is to integrate an export button into your [[:Template|template]].
 Use If you use the default template just switch the following to add another button on in the upper or bottom button row of the default template((In ''/lib/tpl/default/mainconfiguration menu.php'', there are two divs that contain some buttons: ''<div class="bar" id="bar%%__%%top">'' and ''<div class="bar" id="bar%%__%%bottom">''. Just insert the HTML code inside one of the two divs (left or right) ))
 Otherwise use the following to add another button in the upper or bottom button row of the template((In ''/lib/tpl/default/main.php'', there are two divs that contain some buttons: ''%%<div class="bar" id="bar__top">%%'' and ''%%<div class="bar" id="bar__bottom">%%''. Just insert the HTML code inside one of the two divs (left or right) )) 
 <code html>
 <form class="button" method="get" action="<?php wl($ID)?>">
       <div class="no"> 
            <input type="submit" value="Export to ODT" class="button" /> 
            <input type="hidden" name="do" value="export_odt" /> 
            <input type="hidden" name="id" value="<?php echo $ID?>" /> 
 Or use this for a simple 16x16 icon somewhere in your template:
 <code html>
 <a href="<?php echo exportlink($ID, 'odt')?>"><img src="<?php echo DOKU_BASE?>lib/images/fileicons/odt.png" alt="ODT Export" /></a>
 You can mix the 2 previous methods, and get a button with an image inside, with this code: 
 <code html>
 <form class="button" method="get" action="<?php wl($ID)?>">
     <div class="no">
         <button type="submit" class="button">
             <img src="<?php echo DOKU_BASE?>lib/images/fileicons/odt.png" alt="ODT Export" />
            Export to ODT
         <input type="hidden" name="do" value="export_odt" />
         <input type="hidden" name="rev" value="<?php global $REV; echo $REV?>" />
         <input type="hidden" name="id" value="<?php echo $ID?>" />
 ===== Settings =====
 Most settings or configuration options in the ODT plugin can be set in the ODT plugin configuration, by passing the setting as a URL request parameter or by using the syntax tag.
 The precedence is like this (first entry has highest precedence, last entry has lowest):
   - syntax tag
   - URL request parameter
   - ODT plugin configuration setting
   - DokuWiki configuration setting \\ (only relevant for 'toc_maxlevel', see Configuration section below) 
 This is an example for passing the setting **orientation** as a URL request parameter:
 The same works for syntax tags. The syntax tags for settings always have the same format:
 Here again the example for the setting **orientation**:
 ===== Configuration =====
 The current release has the following configuration options:
 ^  Config option name              ^  Function                                                                                                                                                                                                                                                                                                                                                                                                                     ^
 | tpl_dir                          | Sub-directory for the templates in the media manager. Upload your ODT template files to this directory.                                                                                                                                                                                                                                                                                                                       |
 | odt_template                     | ODT file which shall be used as a template. Per default this field is empty. In that case default styles are used.\\ \\ Since version 2016-02-13 the template can also be a CSS file. Make sure to use the correct file extensions (.odt or .css) so that the plugin can differ between the file types. See section [[#Templates support]] for details.                                                                       |
 | showexportbutton                 | Display the ODT Export Button?                                                                                                                                                                                                                                                                                                                                                                                                |
 | showpdfexportbutton              | Display the PDF Export Button? (export to ODT and conversion to PDF)      |
 | css_usage                        | This setting specifies in which way the imported CSS code from the 'css_template' is used. If set to ''off (plugins only)'' (default) then the CSS code will only influence the ODT output of plugins. If set to ''basic style import'' then the ODT plugin will additionally apply the imported CSS code on the basic styles like basic text formatting, headers, lists and tables.                                |
 | media_sel                        | Which @media selector shall be used to query CSS properties? For example 'print' or 'screen'. Currently this only affects the ODT export of plugins, e.g. the [[plugin:wrap|Wrap Plugin]].                                                                                                                                                                                                                                    |
 | css_font_size                    | Specifies the basic font-size for CSS import/handling. This is the initial value representing **1em**.                                                                                    |  
 | css_template                     | The DokuWiki template to use for CSS import. This only affects the CSS content given to plugins. It does not affect the look of the DokuWiki basic syntax.                                                                                                                                                                                                                                                                    |
 | apply_fs_to_non_css              | If set to true then the ''css_font_size'' will also be applied if an ODT template is used or if no template is used at all (no CSS and no ODT template [default]).                      |
 | usestyles                        | You can give a comma separated list of plugins of which the ''style.css'' or ''screen.css'' should be used for ODT generation. By default only ''print.css'' and ''odt.css'' are used. This setting is missing since release 2017-02-11. From that release on the ODT plugin always imports screen and print CSS from each plugin.                                                                                                                                                                                                                                        |
 | twips_per_pixel_x                | Twips per pixel on the X axis.                                                                                                                                                                                                                                                                                                                                                                                                |
 | twips_per_pixel_y                | Twips per pixel on the Y axis.                                                                                                                                                                                                                                                                                                                                                                                                |
 | format                           | The page format of the exported document. The current formats are currently supported:\\ A6, A5, A4, A3, B6 (ISO), B5 (ISO), B4 (ISO), Letter, Legal, Long Bond, Tabloid, B6 (JIS), B5 (JIS), B4 (JIS), 16 Kai, 32 Kai, Big 32 Kai, DL Envelope, C6 Envelope, C6/5 Envelope, C5 Envelope, C4 Envelope, #6 3/4 Envelope, #7 3/4 (Monarch) Envelope, #9 Envelope, #10 Envelope, #11 Envelope, #12 Envelope, Japanese Postcard.  |
 | orientation                      | Orientation of the exported document. This allows the option 'portrait' or 'landscape'                                                                                                                                                                                                                                                                                                                                      |
 | margin Top, Right, Bottom, Left  | Margins for the exported document in centimeters.                                                                                                                                                                                                                                                                                                                                                                             |
 | disable_links                    | If set to 'Yes', links will not be encoded as links but just as plain text.                                                                                                                                                                                                                                                                                                                                                   |
 | toc_maxlevel                     | Maximum depth for the table of contents. If empty, the value of the global DokuWiki option ‘[[config:maxtoclevel]]’ is used.                                                                                                                                                                                                                                                                                                  |
 | toc_leader_sign                  | The leader sign to be inserted in the table of contents.                                                                                                                                                                                                                                                                                                                                                                      |
 | toc_indents                      | The indentation for the table of contents per level. The values are absolute values in centimeters, not relative to the previous level. E.g. the setting '0, 0.5, 1, 1.5, 2, 2.5, 3, 3.5, 4, 4.5' leads to a indentation of 0.5 centimeters more per level. While '0, 1, 1, 1, 1, 1, 1, 1, 1, 1' keeps level 1 not indented and all other levels have the same 1 centimeter indentation.                                      |
 | toc_pagebreak                    | Insert a pagebreak after the table of contents?                                                                                                                                                                                                                                                                                                                                                                               |
 | toc_style                        | Style to be used for the table of contents in CSS format, e.g.: 'color:red;'. Each level uses the same style per default. You can assign specific styles using the syntax tag.                                                                                                                                                                                                                                                |
 | index_in_browser                 | If set to **hide** then the syntax tag **toc** and **chapter-index** will create no visible output in the browser. If it is set to **display placeholder** then a little placeholder paragraph will be shown in the browser showing the user that the syntax tag is there and a table of contents or chapter-index will be inserted on export to ODT.                                                                         |
 | outline_list_style               | If set to **Normal** then headings will have no list style after export.\\ \\ If it is set to **Numbers** then all headings will be numbered after exporting to ODT.\\ \\ Please notice: the numbers of the headings will only appear in the table of contents or chapter index after updating them (which is required anyway).                                                                                               |
 | olist_label_align                | The setting specifies how to align the numbers in front of list items in an ordered list (left, center, right [default]).                                                               |
 | convert_to_pdf                   | The command line to execute for ODT to PDF conversion. The default specifies the command line for PDF conversion using LibreOffice. For details see section [[#PDF conversion]].             |
 ===== Additional syntax tags =====
 There are some syntax tags for additional features which can not be set in the configuration alone because e.g. the position matters or to provide more flexibility. These tags are described in this section.
 ==== pagebreak ====
 A manual pagebreak can be inserted by adding the syntax tag ''<pagebreak>'' in the wiki page. This feature requires the [[plugin:pagebreak|Pagebreak Plugin]].
 ==== page ====
 The syntax tag ''page'' can be used to set the page format, orientation and margins with one single command. The format is the following:
 The following example sets the page format **A3**, orientation **landscape** and all margins to **1** centimeter.
 You can also omit parameters that you do not want to change, e.g.:
 That changes the page format and orientation but not the margins.
 If you want to alter a single page property only, then you can use the settings tags for format, orientation or the margins alone. See some examples below:
   <a href="<?php echo exportlink($ID, '{{odt')?>"format:A3}} 
 {{odt><img src="<?php echo DOKU_BASE?format:A4}} 
 {{odt.png" alt="ODT Export" /></aorientation:landscape}} 
 A change of the page format will finish the current page, cause a pagebreak and the next page will then use the newly set page format.
 ==== toc ====
 The toc syntax tag can be used to insert a table of contents at the position of the tag. Without inserting the toc syntax tag, no table of contents will be created at all. The minimum syntax is:
 This will create a table of contents with all relevant settings taken from the ODT plugin configuration. The title will be 'Table of Contents' (depending on the language set).
 The following options for the toc syntax tag do exist:
   * **maxlevel:** this overwrites toc_maxlevel
   * **title:** this overwrites the language specific default title 'Table Of Contents'
   * **leader_sign:** this overwrites toc_leader_sign
   * **indents:** this overwrites toc_indents
   * **pagebreak:** this overwrites toc_pagebreak
   * **styleH:** this overwrites the **Contents Heading** style in the styles.xml file
   * **styleL1 ... styleLN:** N = maxlevel, overwrites toc_style
 These have all the same meaning as the corresponding configuration settings. Only exception is **styleL1 ... styleLN**. The configuration setting toc_style sets the style for the whole table of contents. **styleL1** only sets the style for toc level 1, **styleL2** only sets the style for toc level 2...
 The option **syntaxH** works the same way as the **styleL** option above but sets the style for the table of contents heading.
 All these options are optional. If you omit one, then the corresponding setting of the configuration (or URL request parameter) will be used. Every option needs to be finished with a **;** .
 Here are some examples (all one line):
 ==== chapter-index ====
 The chapter-index syntax tag can be used to insert a chapter-index at the position of the tag. Without inserting the chapter-index syntax tag, no chapter indexes will be created at all. The minimum syntax is:
 This will create a chapter-index with all relevant settings taken from the ODT plugin configuration for the table of contents. By default the chapter-index will have no title.
 The options for the chapter-index syntax tag are the same as for the toc syntax tag.
 ==== disablelinks/enablelinks ====
 These tags enable or disable link creation just like the configuration setting. Here is the syntax:
 ==== templatepage ====
 This tag can be used to specify a wiki page as a CSS template. That means all content from the page is imported as CSS code. Example:  <code>{{odt>templatepage:mycsspage}}</code> It is totally fine if the CSS code in the templatepage is surrounded by ''<code css>...</code>'' tags to improve readability.
 This feature enables the user to use a CSS template without the need of uploading any files. ATTENTION: using a template page may overwrite already imported style settings from an ODT or CSS template file.
 ==== frame-open/frame-close ====
 These tags insert the content between them inside an ODT frame on export to ODT. The HTML view is not changed. Here is the syntax:
 Putting content in a frame can e.g be used to position that content on a fixed point of the page. This e.g. can be useful for writing letters.
 See [[plugin:odt:frames|details on using ODT frames]] for more information.
 FIXME: create page, describe frame usage in detail FIXME
 ===== Development =====
 Latest Release:
 Development master branch:
 Release 20101030 with Default Template Support: [[|dokuwiki-odt-20140210]].\\
 More older releases are available [[|on this webpage]].
 If you are a developer which is interested in implementing ODT support for a plugin the following pages might be interesting for you:
   * [[plugin:odt:implementodtsupport|Implement ODT support]]
   * [[plugin:odt:csscolorshelper|CSSColorsHelper]]
   * [[plugin:odt:cssimporthelper|CSSImportHelper]]
 ==== Preview ====
 To get some information about the current development release/master branch, have a look at the [[plugin:odt:development|development preview]] page.
 ===== Customizing =====
 There are three ways of customizing how the output will look like :
   Modify the an export of the ''wiki:syntax'' page: 
      * Export the  [[wiki:syntax|wiki:syntax]] page. Then open  
      * Open the result with a ZIP-Archive tool and replace the provided styles.xml with the one from your document.\\  Be careful, DokuWiki's caching system may get in the way when you do that. Remember to clean up your cache. 
   Use the OpenOffice feature to load the styles from an existing file or template :
     * export your page in ODT, and open it in OpenOffice,
     * bring up the styles panel (F11),
@@ Line -81,8 +291,9 @@ removed created
     * select all the checkboxes on the bottom (**including** "overwrite"),
     * click "From file..." on the bottom right and select your customized file, or select an existing template in the list.
   Use a pre-made template, see the following section for details on this feature. 
 ==== Templates support ====
 === ODT template support ===
 You may use templates to export your document. A template is a regular ODT file, as produced by OpenOffice (for example, not tested with other ODT-supporting applications).
@@ Line -101,181 +312,66 @@ removed created
 are applied to some content in the document. If you want to create an empty ODT document for this plugin, and still want to define styles which will be applied to the wiki content, you have to write some dummy text, apply the styles to this text, and surround the text in the ''DOKUWIKI-ODT-CUT-START'' and ''DOKUWIKI-ODT-CUT-STOP'' tags. This way, the styles will be retained in the ODT file, but the dummy text will be removed on export.
 === CSS template support ===
 ===== Other plugins =====You may use templates to export your document. A CSS template is a regular CSS text file. In your wiki page, add the following code: 
   {{odt>template:your template file name.css}} 
 and upload your template to the wiki using the media manager. This usually requires to configure the mime types allowed for upload, see [[:mime]]. By default, you must put it in an '':odt'' namespace (Meaning an "odt" directory right below the root in your wiki). The folder name can be configured using the admin page.
 If you use other syntax plugins, their output may Unlike an ODT template a CSS template does not appear create any content in the exported ODT document: those plugins must be modified to support the ODT output formatHowever, some plugins already support itIt "only" controls the styles for the DokuWiki basic syntax.
 ^Plugin ^ Description ^ 
 |[[plugin:Fields]] | User-defined fields support -- Together with Check out the [[plugin:fields|fields plugin]], you can store data in user-defined fields in your page, and recall this data from anywhere in your document (even in the headers and footers)**example.See the [[plugin:fields|fields plugin documentation page]] for more information.\\ \\ In OpenOffice, user-defined fields are accessible using the Insert menu -> Field -> Other, "Variables" tab, and "User fields" section on the left.\\ \\ This is very useful for document references, project names, etc.| 
 |[[Notes]] | The nice-looking notes provided by the [[plugin:note|note]] plugin are exported to ODT. You need at least version 2008-02-17 of the note plugin for ODT support.| 
 |[[Include]] | The [[plugin:include|include]] plugin will let you generate a single ODT css** file from multiple wiki pages, just like for XHTML. Support for the ODT format is included in the latest release.| 
 |[[Math2]] | The [[plugin :math2|math2]] plugin will let you insert mathematical formulas in a wiki page. Support for the ODT format which should be [[plugin:math2#discussion|imminent]]. In the meantime, you can apply [[plugin:math2#odt|this code]]. | 
 |[[LaTeX]] | The [[plugin:latex|LaTeX]] rendering plugin also will let you insert mathematical formulas in a wiki page, using a back-end LaTeX compiler. Support for ODT export is now included.| 
 |[[Chem]] | The [[plugin:chem]] plugin formats a molecular formula by using %%<chem>%% tag. The latest version supports directory to export ODT format.| 
 |[[Color]] | The [[plugin:color#version_with_odt_renderer_support|color]] color plugin is really a demo get an overview of a simple a syntax plugin. A version has been produced including support the currently supported options for changing the ODT format| 
 |[[DivAlign2]] | Hi. Just wanted you to know that I've made one look of my plugins, [[plugin:divalign2]] (//paragraph alignment//) compatible with ODT plugin output. I should also let you know by mail...  --- //[[|Luis Machuca B.]] 2009/08/22 06:26//| 
 |[[nspages]] | The [[nspages]] plugin creates TOC of namespaces. The latest version supports the exported ODT formatdocument.|
 See Since release version 2016-04-23 a CSS template can also consist of a wiki page. See section [[plugin:odt:rendersupport|ODT render support#templatepage]] for howto and current initiativesdetails.
 ===== Translations PDF conversion =====
 The plugin Since release version 2016-04-23 there is translated into English, German, French, Italian, Spanish, Japanese, Russian and Chinesesupport for optional PDF conversionThanks a lot The exported ODT file can be converted to PDF by using ''do=export_odt_pdf'' instead of ''do=export_odt''. The feature requires installation of an external program to do the translators, new languages are very welcome!conversion e.g. LibreOffice. The command line executed for conversion can be configured. An error page is send to the user if conversion fails.
 Since release 2017-02-11 there is a button for PDF conversion which is labelled with **ODT=>PDF export**. It is only visible if the config option ''showpdfexportbutton'' is on.
 ==== Installation hints for LibreOffice ====
 ===== Bugs ===== 
 To report bugs or suggest features, **please** use [[|When using LibreOffice for PDF conversion the plugin's tracker]]. The author does not monitor this page. 
 ===== Discussion ===== 
 ==== Language-specific styles ==== 
 <code diff> 
 diff -ur odt.old/renderer.php odt/renderer.php 
 --- odt.old/renderer.php 2010-10-30 11:25:54.000000000 +0200 
 +++ odt/renderer.php 2011-02-15 13:52:26.000000000 +0100 
 @@ -307,6 +307,9 @@ 
      function document_end_scratch(){ 
          $autostyles = $this->_odtAutoStyles(); 
          $userfields = $this->_odtUserFields(); 
 +        foreach ($this->extrastyles following error message might be reported on trying to download a ODT document as $stylename=>$stylexml) { 
 +            $extrastyles .= $stylexml; 
 +        } 
          // add defaults 
          $this->ZIP->add_File('application/vnd.oasis.opendocument.text', 'mimetype', 0); 
 @@ -364,6 +367,7 @@ 
          $value = io_readFile(DOKU_PLUGIN.'odt/styles.xml'); 
          $value = str_replace('<office:automatic-styles/>', $autostyles, $value); 
 +        $value = str_replace('<office:extra-styles/>', $extrastyles, $value); 
          // build final manifest 
 @@ -910,7 +914,16 @@ 
      function _highlight($type, $text, $language=null) { 
          global $conf; 
 -        $style_name = "Source_20_Code"; 
 +        if($language!=''){ 
 +            $style_name = "Code $language"; 
 +            $this->extrastyles["Code $language"] = ' 
 +    <style:style style:name="'."Code $language".'" style:display-name="Code '.$language.'" style:family="paragraph" style:parent-style-name="Preformatted_20_Text"> 
 +        <style:paragraph-properties fo:padding="0.05cm" style:shadow="none" fo:border="0.002cm solid #8cacbb" fo:background-color="#f7f9fa"/> 
 +    </style:style> 
 +            '; 
 +        } else{ 
 +            $style_name = "Source_20_Code"; 
 +        } 
          if ($type == "file") $style_name = "Source_20_File"; 
          if (is_null($language)) { 
 diff -ur odt.old/styles.xml odt/styles.xml 
 --- odt.old/styles.xml 2010-10-30 11:25:54.000000000 +0200 
 +++ odt/styles.xml 2011-02-15 13:45:09.000000000 +0100 
 @@ -113,6 +113,7 @@ 
          <style:style style:name="Graphics" style:family="graphic"> 
              <style:graphic-properties text:anchor-type="paragraph" svg:x="0cm" svg:y="0cm" style:wrap="dynamic" style:number-wrapped-paragraphs="no-limit" style:wrap-contour="false" style:vertical-pos="top" style:vertical-rel="paragraph" style:horizontal-pos="center" style:horizontal-rel="paragraph"/> 
 +    <office:extra-styles/> 
              <text:outline-level-style text:level="1" style:num-format=""> 
                  <style:list-level-properties textPDF:min-label-distance="0.381cm"/>
 [Java framework] Error in function createSettingsDocument (elements.cxx). javaldx failed! Warning: failed to read path from javaldx
 ==== General Use ====
 Will someone write a short example how to **integrate export button into template**? I tried to do it myself, but CSS, PHP, HTML are unfamiliar for me. Template consist of 9 files of different types. Which file should be modified? Thanks. --- //[[|Alexander]] 2008-02-29 17:57// 
 In ''/lib/tpl/default/main.php'', there are two divs that contain some buttons: ''<div class="bar" id="bar%%__%%top">'' and ''<div class="bar" id="bar%%__%%bottom">''. Just insert the HTML code provided in this page once and inside one of the two divs (left case LibreOffice fails because it has not got or right). If can not read from itdoesn't please you, try another place. 
 > Now it is wise not s configuration directory belonging to edit this default template file but proceed as stated on [[:devel:templates|this page]]. 
 >  --- the webserver//[[christophegragnic@yahooPHP|Grahack]] 2008-03-02 10:02//
 On my Ubuntu machine the webserver user was **www-data**, his home directory was **/var/www** and the configuration directory for LibreOffice was **.config/libreoffice**. So I needed to create the directory **/var/www/.config/libreoffice** and set the owner to **www---data** to make it work.
 It is possible to **import ODT into DokuWiki**?
 > Yes, have a look on --- // OOo User 2008-02-19 09:52//
 > Though, it looks like the latest version of Writer's Tools for OOo has removed DokuWiki conversion.
 How can I get the **page title** to be included in the template, not just as the name of the file ? ---//[[|SME]] 2008/06/03//===== ODT support for plugins =====
 ----If you use other syntax plugins, their output may not appear in the exported ODT document: those plugins must be modified to support the ODT output format. However, some plugins already support it.
 See **Thanks[[plugin:odt:rendersupport|ODT render support]]** for this plugin! Downloaded, added the button in ACH template and works :-) -- at least now, and I'm not using list of plugins which already support export to ODT. On that page you can also add plugins to the template feature yet ;-)  --- //[[wernerlist of plugins for which you wish ODT export to be|Werner Flamme]] 2008/09/04 21:29 CEST//
 ----===== Translations =====
 Thanks for the GREAT The plugin . works out of the box in no time! Is there any means of **specifying the template** in the link rather than the wiki code?  I'd prefer a single modification to my templateis translated into Englishlike 
 <?php echo exportlink($IDGerman'odt&template=your_template_file nameDanish, French, Korean, Dutch and Japaneseodt')?> rather than having Thanks a lot to put the required line in all pages... and having users messing with it. ---//[[|Berteh]] 2008/10/22// 
 >for now I hacked the plugin to add a "template" option in config: hope this helpstranslatorsfeel free to correct this code if you spot errors. ---//[[|Berteh]] 2008/10/22// 
 1. add to odt/conf/default.php 
   $conf['tpl_template'] = 'my_custom_template.odt'; //comment this line to not use any template 
 2. add to odt/conf/metadata.php 
   $meta['tpl_template'  = array('string'); 
 3. edit function document_end() in odt/renderer.php: (line 250) 
   function document_end(){ 
   +      if (new languages are very welcome!$this->template) { // if no template chosen in current page, get default template from config 
   +           $this->template=$this->getConf("tpl_template"); 
   +      } 
          if ($this->template) { // template chosen
 > That's a good idea, I should probably include that at some point.  --- Please use the [[http://[[|Aurélien BompardDokuWiki Localization Tool]]2010/04/04 11:21//.
 ** ODT export error **\\ 
 I bumped into the problem that ODT export stopped working for me, even the pdf export stopped working.
 After a long time I found the error.
 In the global apache2 php.ini file mbstring.func_overload was set to 7 by mantis bug tracker
 (mbstring.func_overload = 7).\\ 
 Dokuwiki ODT export does not like this setting.
 It has to be mbstring.func_overload = 0 or if you wish to set it only for one site use .htaccess (php_value mbstring.func_overload 0).
 **Modifying Table Properties**
 We are trying to get tables not to break on page boardes - the progress is in here:
   * **UPDATE** This one is finaly fixed! We now have a modified renderer.php which generates non breaking tables all the time, I am so happy :D Thanks to one of the moderators of the OpenOffice Forums :D Get the renderer.php here:
 ====Non-ASCII pagename in Windows cannot export = Bugs =====
 It's because Windows doesn't support unicode file name so temp directories cannot be createdTo report bugs or suggest features, **please** use [[https://github.Change the temp file name to md5 can solve the problemcom/LarsGit223/dokuwiki-plugin-odt/issues|GitHub Issues]]. The author does not monitor this page.
 <code diff> 
 ===(+2,-2) renderer.php == Tutorials/more Documentation = 
 @@ -382,7 +382,7 @@ 
          } else { 
              $temp_dir =$conf['savedir'].'/cache/tmp'; // version <=20070626 
 -        $this->temp_dir =$temp_dir."/odt/".str_replace(':','-',$ID); 
 +        $this->temp_dir =$temp_dir."/odt/".md5($ID); 
          if (is_dir($this->temp_dir)) { $this->io_rm_rf($this->temp_dir);
 For some more detailed examples and documentation have a look at the following pages: 
   --- [[user>danny0838plugin:odt:tutorials:toc|Table of Contents Tutorial]]//2011/01/26 14 
   * [[plugin:57//odt:tutorials:odttemplate:create|Create an ODT template file Tutorial]] 
   * [[plugin:odt:tutorials:odttemplate:stylingnormaltext|ODT template: styling normal text Tutorial]] 
   * [[plugin:odt:tutorials:odttemplate:stylingheadlines|ODT template: styling headlines Tutorial]] 
   * [[plugin:odt:tutorials:odttemplate:stylingtextextended|ODT template: extended text styling Tutorial]] 
   * [[plugin:odt:tutorials:odttemplate:stylinglists|ODT template: list styling Tutorial]] 
   * [[plugin:odt:styleimportgeneral|A general description of ODT style import]] 
   * [[plugin:odt:cssimportparagraphstyle|A description of CSS import for paragraph styles]] 
   * [[plugin:odt:cssimportcharacterstyle|A description of CSS import for character styles]]
 ==== Extra space after linebreak ====
 If you use %%\\\n%% as single linebreak, there would be an extra space after the linebreak in the output odt. This can be fixed by adding an instruction in the document_end funciton in the renderer.php:
 <code diff>
         $this->doc = preg_replace('#<text:p[^>]*>\s*</text:p>#', '', $this->doc);
 +        $this->doc = preg_replace('#<text:line-break/>\n+#', '<text:line-break/>', $this->doc);
  --- [[user>danny0838]] //2011/01/28 04:51//
 ==== Does not export text descriptions for file links ====
 It would be great if this plugin could also export text descriptions that link to files:
 [[ks:somepage|This text describing an internal link is exported to ODT]]
 [[|This text describing an external link is also exported to ODT]]
 {{:somefile.pdf|This text describing a link to a document is NOT exported to ODT}}
  --- //[[|Eagle]] 2011-08-29 15:42//
plugin/odt.txt · Last modified: 2020-09-02 21:41 by LarsDW223