Generate a Weboffice ePaper report via Script API

It is possible to generate WebOffice ePaper reports via the WebOffice 10.9 SP1 Script API function by using the function scriptAPI.generateEPaper( aObjectIds, sEPaperId, sEPaperFormat, sEPaperName, oDynFields, iDpiCount, bSuppressCopyright, bNoDocumentDisplay )


The following parameters will be used by the function:


aObjectIds (string/array)
The unique feature id(s); pass either multiple values delimited by semicolon or an array of multiple object ids

sEPaperId (string)
The name of the configured WebOffice ePaper report


aEPaperFormat (string)
The format of the output document, possible values are PDF|XLSX|DOCX|RTF|ODT, any other string or null uses the WebOffice configuration value

sEPaperName (string)
The name of the generated WebOffice ePaper document; pass null if the WebOffice 10.9 SP1 default naming convention should be used


WebOffice ePaper reports can also be archived. See chapter Common Settings for configuration details. If you assign a name (sEPaperName) for your report via Script API, then an already existing document with this name in the archive will be overwritten. If no name is assigned, the creation time and user name will be used (e.g. YYYYMMDD_HHMMSS_USER.pdf).

oDynFields (object)
Javascript object holding dynamic field ids and value in the form oDynFields = { fieldId1: fieldValue1, fieldId2, fieldValue2, ... }; pass null if no dynamic fields are available or should be set


The function supports the dynamic fields (no captions): title_value, orgname_value, orgadr_value, creator_value, createdat_value, disclaimer_value. For the date field various formats are accepted.

iDpiCount (integer)
The resolution of the WebOffice ePaper report document: only used for reports of type PDF; pass null to use the WebOffice 10.9 SP1 configuration value

bSuppressCopyright (boolean)
Set true if embedded maps are not to show copyright information


Since each WebOffice ePaper report is connected to a WebOffice 10.9 SP1 layer no layer ID has to be set.

Currently scale and map views cannot be defined in the WebOffice 10.9 SP1 Script API but they may be configured in the project configuration.

A valid WebOffice ePaper template must be configured in WebOffice author! If more than one template configured in WebOffice author relates to the same .mrt file, the first configuration will be considered.