Office Macro
Displays the content of an office attachment as HTML inside the current document |
Type | JAR |
Category | |
Developed by | |
Rating | |
License | GNU Lesser General Public License 2.1 |
Bundled With | XWiki Standard |
Compatibility | XWiki Enterprise >= 2.5 Milestone 2 |
Table of contents
Description
Displays an office file (e.g. presentation, spreadsheet or word document) within the content of a wiki page. It uses the Office Importer Application to convert the office file to HTML before displaying it.
Usage
From WYSIWYG Editor
When inserting or editing the macro call from the WYSIWYG editor there's a picker to help you select or upload the office file to view.
From Wiki Syntax
Parameters definition
Name | Optional | Allowed values | Default value | Description |
---|---|---|---|---|
attachment | no | a valid attachment reference | The name of the attachment to display. | |
reference | no | a valid resource reference or a valid attachment reference | url:) and attachments (attach:). If no reference type or an unknown reference type is provided it's parsed as attachment reference. | The reference of the attachment to display. The supported resources are URLs (|
filterStyles | yes | true/false | true | Whether to filter out all non-essential styles from the parsed content |
Examples
Displays an office attachment defined as an attachment in another page:
Configuration
The office macro uses the office server to convert presentation slides into images. By default these images are not very large. If you want to configure the image dimensions and other stuff you'll have to copy document-formats.js from the jodconverter jar to WEB-INF/classes and edit it. For instance, if you want the slide images to have 1024px width you have to change this line:
with
You can also control the compression level / quality of the generated images:
Prerequisites & Installation Instructions
The OpenOffice Server needs to be configured and started in order for this macro to work. See the prerequisites for the Office Importer Application for instructions.