It's better when it's simple

User Tools

Site Tools


odtplus2dw Plugin

Compatible with DokuWiki

Greebo, 2018-04-22

plugin Create a dokuwiki page from a file

Last updated on

Similar to file2dw, odt2dw

Tagged with docx, import, odt, pandoc, soffice


:!: External requirements: This plugin requires the following additional components that must be installed separately:

  • php xsltProcessor class (ex : php-xml, php5-xsl)
  • php zipArchive class
  • pandoc
  • soffice (ex: libreoffice-writer)

If you run the Dokuwiki server on Debian, you can accomplish this requirements following this directions:

  • Install some packages needed:
sudo apt-get wget default-jre php5-xsl libreoffice-writer
  • If you wish, you can execute the script (included with this plugin) to install the latest version of pandoc. Or you can install pandoc any other way (check that version installed is not very outdated, or the conversion can fail).

Install the plugin using the Plugin Manager and the download URL above, which points to latest version of the plugin. Refer to Plugins on how to install plugins manually.

soffice conversion (.doc support)

PHP code (at least in my system) is executed by the user daemon. I had problems running a Java application with this user (it seems soffice is a Java application) so I decided to run the soffice conversion using sudo. To make it work, I had to add a line to the file /etc/sudoers. You can do the same executing:

sudo echo "daemon ALL=(root)NOPASSWD:/usr/bin/soffice" >> /etc/sudoers

I'm not a security expert, but I think that this should not be a problem for anybody. If you do not use the soffice conversion (.doc support), you don't need to do this.

If PHP code is executed by any other user on your system, you only have to change it in the previous command.


From a Dokuwiki page, click on the “Import file” button in the Page Tools. Select a File and click upload.

Configuration and Settings

They are almost self-explanatory.

Change Log

  • v0.12 beta
  • v0.11 beta
    • Now the names of uploaded files can contain spaces.
    • Added French translation (thank you jmgfr!).
  • v0.10 beta
    • Changed name to odtplus2dw.
    • Added doc/docx support.
    • Added spanish translation.
    • Removed some translations (I can't update them, so I had to remove).
  • v0.09 beta
    • Adjust method signatures to match parent.
    • Add import button.
  • v0.08 beta
    • Fixed : bug #9.
    • Fixed : bug #14.
  • v0.07 beta
    • Fixed : parserPostDisplay now works with choice edit or preview.
    • Fixed : better class existence control.
  • v0.06 beta
    • Fixed : some small fixes to the english messages.
    • Add : message translation in Dutch (By mprins).
    • Fixed : check for mime type was too specific : It could be set in config panel.
    • Fixed : submit button was not translated and stay in french : His value depend of the dokuwiki lang file now.
  • v0.05 beta
    • Fixed : display an error if the parserUploadDir directory doesn't exists. Now it will be create if needed.
plugin/odtplus2dw.txt · Last modified: 2024-02-14 12:45 by qky666

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki