Esko Logo Back to Esko Support
Choose your language for a machine translation:
Skip to end of metadata
Go to start of metadata

License

This functionality requires the Additional File Support license.

Description

You can view Microsoft Office documents and other file types in WebCenter (16.1 onwards) by specifying the file extensions and the corresponding OBGE Workflow tickets. The system administrator can define the extensions in the configuration file. For each of these extensions, you need a custom view generation ticket. This is a ticket on the OBGE that will generate the required files to make a document viewable in the WebCenter 2D Viewer.

This feature requires configuration, scripts to convert these files into files that can be displayed by the WebCenter HTML5 Viewer. The HTML5 Viewer can display pyramid files as created by Automation Engine's Prepare for Viewing task as well as .SVG files.

This knowledge base article describes how to set up WebCenter and OBGE to allow conversion of MS Office files.

Read also: http://docs.esko.com/docs/en-us/webcenter/16.1/quickstartguide/home.html?q=en-us/common/wc/concept/co_wc_viewable_other_documents.html 

Procedure

Installing LibreOffice and Script Runner

To convert Office files to something viewable, Automation Engine's Script Runner will call a script that uses LibreOffice. This script converts Word, PowerPoint or Excel into PDF format. This Script Runner can reside on the OBGE or on another dedicated server. In any case you will have to download and install LibreOffice and Script Runner on that server.

The LibreOffice installer can be found at http://www.libreoffice.org/download/download/. As of now, we support version 4.0.

Script Runner can be downloaded from the OBGE server by going to <OBGE-server-name>:9999 in a browser. Click the Tools link and you'll see a Download button for Script Runner.

Adding Scripts

Now that LibreOffice and Script Runner are installed, we have to add batch scripts that do the conversion. There are two types of scripts:

  1. A Script that converts an office file to .svg files, which allows the WebCenter HTML5 Viewer to enable Text Selection and deep zoom. This Script requires JAVA to be installed on the server.  
  2. A Script that converts an office file to .pdf files, which can be further processed by Automation Engine's Prepare for Viewing node to create pyramid files.

Attached is a zip containing all files needed to run these scripts (MSOfficeSupport_Attachments.zip). These should be added to the Script Runner's script folder (C:\Esko\bg_data_fastserverscrrunnt_v100\Scripts\Batch). The zip also contains the Automation Engine tickets and a word file with extra information.

Open the scripts to make sure that the scripts are pointing to the correct location for the "soffice.exe" command and the pdf2svg.jar.

Once a Qoppa license key is available, it should also be added to the scripts that convert files to .svg. A placeholder, present in the scripts, indicates where you need to insert the key.

Adding Workflow Tickets

The attached zip contains two Automation Engine tickets which should be imported into the OBGE. Make sure that the Script Runner nodes in the tickets are pointing to the correct location of the scripts.

Updating customConfig.xml

Now that the scripts are in place, you can update customConfig.xml on the WebCenter WebServer.(<WebServer_Path>/<Web_Instance>/custom/customizationConfig.xml).

Add the following XML inside the <WebCenterCustomizationConfig> tag:

<SupportedViewableOther>       <extension value=".doc" ViewGenerationTicket="MSOffice_to_SVG"/>
       <extension value=".docx" ViewGenerationTicket="MSOffice_to_SVG"/>
       <extension value=".ppt" ViewGenerationTicket="MSOffice_to_Pixel"/>
       <extension value=".pptx" ViewGenerationTicket="MSOffice_to_Pixel"/>
       <extension value=".xls" ViewGenerationTicket="MSOffice_to_SVG"/>
       <extension value=".xlsx" ViewGenerationTicket="MSOffice_to_SVG"/>
  </SupportedViewableOther>

To enable the generation of view files through the Workflow Engine, you will also have to add a <MainInstance value="true"/> tag to the customizationConfig of one WebCenter Instance. The workflow engine will use the tickets from this instance to generate the view files.

Microsoft Excel Support

Microsoft Excel works a little different than Word and PowerPoint. While Word and PowerPoint documents are nicely split into pages, Excel documents are not. Excel Documents will vary in size. 

Behind the scenes, Office Documents are printed to PDF before making them viewable. For Excel files, this will often lead to weird pagination. Unfortunately, there is no setting to dynamically scale the PDF output as these settings are stored per document. Therefore, it is important that page settings are made for each Excel document before uploading it to WebCenter. 

Article information
Applies to

WebCenter

Created

 

Last revised

 

AuthorTVRE
Case Number 
Contents