Extensions Wiki » Extensions » Office Importer Application

Office Importer Application

Last modified by Vincent Massol on 2013/03/11 09:07
x-office-document.pngEasily turn Office documents (MS Office, Open Office, PDF, etc) into wiki pages
TypeXAR
Developed by

XWiki Development Team

LicenseGNU Lesser General Public License 2.1
Bundled With

XWiki Enterprise, XWiki Enterprise Manager

Compatibility
  • XWiki Enterprise 1.8.4
  • OpenOffice 3.0 or above
Installable with the Extension Manager

Download v4.5.1

Description

The Office Importer allows users to import office documents like word documents, spread sheets and presentations into wiki pages easily. 

The Office Importer features include:

  • Convert existing documents into wiki pages
  • Use common office suites as wiki authoring tools

Currently the office importer features can be used in 2 ways:

  • Using the top level "Add" menu which allows importing existing office documents into wiki pages
  • The WYSIWYG integration, which allows copy/pasting office content into the WYSIWYG editor.
  • The Office Importer requires a back-end Open Office server for its operations.
  • The Office Importer supports Office 2007 file formats only starting with XWiki Enterprise version 2.2 Milestone 1.
You should also check the Office Macro.

Add Menu Integration

Once XWiki Enterprise is configured correctly (and OpenOffice server is started), users will be able to access the Office Importer Application via the Add menu:

ActionsMenuColibri.png

Office Importer provides a self-explaining UI which makes it easy for you to import office documents:

OfficeImporter.png

WYSIWYG Integration

You can also use the Office Importer inside XWiki's rich text editor:

OfficeImport

The Office Importer icon is the last to the right in XWiki's rich text editor

The importer allows users to import Office files while editing wiki pages in the rich text editor. For instance, users can copy/paste content from Microsoft Word:

PasteFromWord

Complete Office documents can also be imported right from the editor:

ImportDocument

Prerequisites & Installation Instructions

We recommend using the Extension Manager to install this extension (Make sure that the text "Installable with the Extension Manager" is displayed at the top right location on this page to know if this extension can be installed with the Extension Manager).

You can also use the following manual method, which is useful if this extension cannot be installed with the Extension Manager or if you're using an old version of XWiki that doesn't have the Extension Manager:

  1. Log in the wiki with a user having Administration rights
  2. Go to the Administration page and select the Import category
  3. Follow the on-screen instructions to upload the downloaded XAR
  4. Click on the uploaded XAR and follow the instructions

The Office Importer application comes pre-bundled with XWiki Enterprise versions greater than 1.8M1, so there is no need for a manual installation. The Office Importer makes use of a running OpenOffice server to convert office documents into HTML before they are finally transformed into XWiki 2.0 syntax. Thus, an OpenOffice server instance is required on the server computer which hosts your XWiki Enterprise installation. Beginning with XWiki Enterprise 1.8.4 you can configure an OpenOffice server in one of the two different ways described below.

If you've installed the Office Importer by installing a XAR it might happen that you've chosen options that reset Programming Rights (which are needed for this application). If this is the case you'll have to re-save the Office Importer Admin page. Go to Administer Wiki, click on the Open Office Server, and then change the link to : http://hostname:8080/xwiki/bin/edit/XWiki/OfficeImporterAdmin?editor=wiki. Click the Save and View button, and then try starting the server again.

Internally managed OpenOffice server process (default)

This is a very easy (and safe) option where your XWiki Enterprise application takes care of managing the OpenOffice server process for you. To configure the OpenOffice server management scheme, you can use the WEB-INF/xwiki.properties configuration file:

#----------------------------------------------------------------------------------
# Settings for the OpenOffice server instance consumed by the OfficeImporter component
#----------------------------------------------------------------------------------

#-# Type of the openoffice server instance used by officeimporter component.
#-# 0 - Internally managed server instance.
#-# 1 - Externally managed (local) server instance.
# openoffice.serverType=0

#-# Port number used for connecting to the openoffice server instance. 
# openoffice.serverPort=8100

#-# If the openoffice server should be started / connected upon XE start.
# openoffice.autoStart=false

#-# Path to openoffice installation (serverType:0 only).
# openoffice.homePath=/opt/openoffice.org3/

#-# Path to openoffice execution profile (serverType:0 only).
# openoffice.profilePath=/home/user/.openoffice.org/3

#-# Maximum number of simultaneous conversion tasks to be handled by a single openoffice process (serverType:0 only).
# openoffice.maxTasksPerProcess=50

#-# Timeout for conversion tasks (in miliseconds) (serverType:0 only).
# openoffice.taskExecutionTimeout=30000
Default values for homePath and profilePath configuration options will be calculated based on your operating environment. Even though this is the case, this calculation might not yield accurate results for some systems. So it's a good idea to configure these values manually by editing the xwiki.properties file.
Due to XWiki bug 7164, XWiki ignores the home path settings for the office server in xwiki.properties. As workaround add on Windows in the file start_xwiki.bat the line
set XWIKI_OPTS=%XWIKI_OPTS% -Doffice.home="C:\Program Files\LibreOffice 3.4"
or
set XWIKI_OPTS=%XWIKI_OPTS% -Doffice.home="C:\Program Files (x86)\LibreOffice 3.4"
on Linux add in the file start_xwiki.sh the line
set XWIKI_OPTS=%XWIKI_OPTS% -Doffice.path=/usr/lib/libreoffice/
and restart the XWiki server.

If your XWiki instance fails to automatically locate the install path of the OO server, here are some default install paths of the OO on different operating systems:

  • Microsoft Windows XP/Vista/7:

    Example for OpenOffice 3 (32-bit):

    openoffice.profilePath=C:/Users/{user}/AppData/Roaming/openOffice.org/3
    openoffice.homePath=C:/Program Files/OpenOffice.org 3

    Example for LibreOffice 3.4 (32-bit):

    openoffice.profilePath=C:/Users/{user}/AppData/Roaming/LibreOffice/3
    openoffice.homePath=C:/Program Files/LibreOffice 3.4

    Example for OpenOffice 3 (64-bit):

    openoffice.profilePath=C:/Users/{user}/AppData/Roaming/openOffice.org/3
    openoffice.homePath=C:/Program Files (x86)/OpenOffice.org 3

    Example for LibreOffice 3.4 (64-bit):

    openoffice.profilePath=C:/Users/{user}/AppData/Roaming/LibreOffice/3
    openoffice.homePath=C:/Program Files (x86)/LibreOffice 3.4
    • The example paths above are for LibreOffice 3.4.x. For LibreOffice 3.3.x you have to replace the "3.4" in the path by "3.3".
    • The correct path to the LibreOffice's executable directory should be #openoffice.homePath=C:/Program Files/LibreOffice 3.4/program, but XWiki automatically adds /program to the given path for a Windows environment.
  • Ubuntu Linux (10.04):
    openoffice.homePath=/usr/lib/openoffice/
  • Ubuntu Linux (11.10):
    openoffice.homePath=/usr/lib/libreoffice/
  • Fedora:
  • Mac OSX:

    Example for LibreOffice:

    openoffice.homePath=/Applications/LibreOffice.app/Contents

If you leave your XWiki Enterprise application to manage the OpenOffice server process (which is the default behaviour), your Office Importer admin UI will look something like below:

admin1.png

Externally managed (local) OpenOffice server process

This option allows you (the system admin) to control the OpenOffice server process as desired. This is very useful if you wish to customize OpenOffice server start-up parameters. You can configure this behaviour within the xwiki.properties file as shown below:

#----------------------------------------------------------------------------------
# Settings for the OpenOffice server instance consumed by the OfficeImporter component
#----------------------------------------------------------------------------------

#-# Type of the openoffice server instance used by officeimporter component.
#-# 0 - Internally managed server instance.
#-# 1 - Externally managed (local) server instance.
openoffice.serverType=1

#-# Port number used for connecting to the openoffice server instance.
# openoffice.serverPort=8100

#-# If the openoffice server should be started / connected upon XE start.
# openoffice.autoStart=false
For the profilePath configuration option, you need to have an OpenOffice profile directory created somewhere on the system. This can be a problem in server environments where launching OpenOffice is not an option. In such situations you can create an OpenOffice profile on a local computer and upload it to the server running XE.

Once XWiki Enterprise is configured in this manner, an OpenOffice server must be manually started as a separate process. You can issue the following command to accomplish this:

soffice -headless -accept="socket,host=127.0.0.1,port=8100;urp;" -nofirststartwizard

Don't forget to replace <soffice> with the path to your OpenOffice executable. More information regarding OpenOffice server deployment is provided here. Also note that the Office Importer admin UI will change reflecting the new configuration as shown below:

admin2.png

Linux users may refer to additional installation notes here.

Auto start / Auto connect (feature)

This feature was introduced beginning with the XWiki Enterprise 1.8.4 version. With this option enabled, you don't need to worry about starting / connecting the OpenOffice server from the Office Importer admin UI every time you restart XE. This option can be configured from xwiki.properties file as shown below:

#-# If the openoffice server should be started / connected upon XE start.
openoffice.autoStart=true

Dependencies

Tags:
Created by Asiri Rathnayake on 2009/01/20 07:10

Download XWiki

Get Connected