Command Reference CIB jsMerge

Introduction

Accessing the CIB jsMerge DLL

Allgemein
Call via CIB runshell
Call via CIB job

Allgemein

CIB jsMerge can be accessed via the CIBJSMerge32.dll, using CIB runshell, CIB job or the technical interface (API).

All properties which can be used to access CIB jsMerge are described in detail in Technical Manual. Short description of the most important properties follows:

inputfile:
An .odt file can be set as input file here. This file represents the root document. Additional documents (templates) can be included in the root document.

outputfile:
The intended output filename of the resulting document can be specified here. The resulting document contains all the information merged from templates and the data supply.

scriptfile:
Global functions, written in the scripting language JavaScript can be defined in the script file. These global functions then are available in all templates. The script file has to be UTF-8 encoded.

licenseCompany:
This property sets the licensee from the license information. This property has to be set in a CIB jsMerge call.

licenseKey:
This property sets the license Key from the license information. This property has to be set in a CIB jsMerge call.

datafile:
Data supply can be a CSV file or a XML file. These files contain data that is used later on in the root document or it‘s embedded templates.

Notes:

The property names are case insensitive.
All the properties mentioned above can be passed via the script file.

Attention:
The script file has to be UTF-8 encoded.

Example scriptfile:

setProperty("inputfile", "./filename.odt");
setProperty("outputfile", "filename_out.odt");
setProperty("datafile", "test/control.csv");
setProperty("multidatafile", "1");


Call via CIB runshell

CIB jsMerge can be called via CIB runshell as follows:

Cibrsh.exe <property1>=<value1> <property2>=<value2> -js [<inputfile name><outputfile name>]

Example 1:
Cibrsh.exe scriptfile=myScript.js licenseCompany=licensee licenseKey=xxxx-xxxxx-xxxxxxxx datafile=data.csv –js input.odt output.odt


When calling CIB jsMerge via CIB runshell it is possible to insert inputfile and outputfile via property "inputfile" and "outputfile".

Example 2:
Cibrsh.exe scriptfile=myScript.js licenseCompany=Licensee licenseKey=xxxx-xxxxx-xxxxxxxx datafile=data.csv inputfile=input.odt outputfile=output.odt –js

 

Notes:

The properties licenseCompany and licenseKey have to be set for every call.

Properties can be set directly in the CIB runshell call (command line) or in the script file. The following rules apply:
If properties are set directly in the CIB runshell call, they by default take precedence over script file properties.

If the properties set in the script file should take effect, the override-parameter within the setProperty() command has to be set to "true".

Example:
For the CIB runshell call already shown above

Cibrsh.exe scriptfile=myScript.js licenseCompany=licensee licenseKey=xxxx-xxxxx-xxxxxxxx datafile=data.csv inputfile=input.odt outputfile=output.odt –js

The following is set in the script file "myScript":

setProperty("inputfile", "./differentInput.odt", true);
setProperty("outputfile", "differentOutput.odt", false);
setProperty("datafile", "test/differentData.csv");


In this example the input file "differentInput.odt" from the script "myScript.js" is passed to CIB jsMerge because the override-parameter was set to "true". The property passed via the direct command line CIB runshell call is ignored in this case.

The output file "output.odt" and the data source "data.csv" are passed as specified in the direct command line CIB runshell call because the properties’ override parameters set in the script file are either set to "false" or have no override-parameter set.


Call via CIB job

Calling CIB jsMerge via CIB job is in the pipeline.