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
This knowledge base article describes how to set up WebCenter and OBGE to allow conversion of MS Office files.
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/. We support as of 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.
Now that LibreOffice and Script Runner are installed, we have to add batch scripts that do the conversion. There are two types of scripts:
.svgfiles, which allows the WebCenter HTML5 Viewer to enable Text Selection and deep zoom. This Script requires JAVA to be installed on the server.
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
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.
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.
Now that the scripts are in place, you can update
customConfig.xml on the WebCenter WebServer.(
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 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.