Please enable JavaScript to view this site.

InterFormNG Manual 2020

InterFormNG_Text_elements_001

 

The Text element inserts a text in the output. The font used will be the one specified in the previous text style elements. To insert a text element you first select a place in the element list inside a page element, click the text element on the left, and then click in the result view to physically place the text in the output. The position can later be changed by either dragging the text in the result view, or by typing the new positions.

 

The rotation of a text is found under the Advanced tab.

 

Each option is described below:

 

Layout settings

Sets the position in the output. Either as a constant or via an offset variable.

 

Selection input

This is the data, that you want to print out and the type of the text:

InterFormNG_Text_elements_002

Each type is described below:

 

Constant

A constant text is inserted in the output.

 

Xpath

The result of an Xpath expression is printed out:

InterFormNG_Text_elements_003

 

For the Xpath expression you have 3 options:

1.Map a node from the input XML file.

2.Map a substring of the text from a node in the input XML file.

3.Type in an Xpath expression.

 

Map a node from the input XML file.

To map a node from the input XML file, you should select Xpath above, a node in the input XML file, and click the Select from document icon.

 

Map a substring of the text from a node in the input XML file.

To map only a substring you can use the normal substring Xpath function, but with the icon Substring from document, it is extremely simple to map only a part of a node in the input XML file. To use it, you should click a node in the input XML file and click the Substring from document. That will display the complete text found in the select node like below:

 

InterFormNG_Text_elements_004

 

Now click Add substring to include only the selected string in your output.

 

Type in an Xpath expression.

If you want to refer to the value of a variable in an Xpath expression, you state it like this: {@variable}. This will be substituted before the Xpath expression is calculated.

 

The Xpath defines the path from the referenced cursor - or if this field is blank: The path from the default cursor. The cursor is a ‘pointer’ pointing to the place in the XML file, that is currently worked on. More details are listed under XML cursor and the example for multiple XML files.

 

Variable

Include the value of a variable in the output.

 

Function

This refers to an internal function in InterFormNG. Available functions are:

Timestamp

Timestamp prints the current date and time. A video showing one use of the timestamp can be found here:

 

 

 

 

 

 

 

 

The actual output can be changed, if you select date as the text type (in selection input on the text element), and use the text style to setup how the output should be formatted.

Current pageNumber

Prints the current page number.

Last pageNumber

In the designer it is displayed as 99999, but the correct number will be used in the final output (you can do a preview to verify). The right number is insert as the final part of processing, so you cannot do any calculations with this - even if you copy this into a variable.

File name (without path)

The name of the input XML file e.g. Intro_demo.xml

File name (without extension)

Prints the name of the input XML file excluding the extension e.g. Intro_demo.

Processing file name

Prints the complete path and name (including extension) of the input XML file.

 

Translation

Prints the result of a look up in a referred translation table for a specific key. This refers to an imported translation file and use the locale style to select the specific language.

 

Meta data

Prints the value of a meta data key via a drop down list. If the specific meta data is not listed in the designer, then you can add it to your own drop down list here.

 

The Data type

To the right of the element type (Constant/Variable, Function..), which is described above, you set the data type of this element. This can be set to Text, Boolean, Number or Date. The data type will have an effect on how the data is printed out.

 

It is very important, that the text really is the correct type when defining it as boolean, number or date. The requirements are these:

Boolean                

Values 0 and 1 (same as false and true), or a boolean xpath expression are allowed. Invalid values are currently not shown and no error message is issued.

Number                

Numeric values using a dot as a decimal point - without any thousand separator are allowed. Invalid data are not shown and no error message is issued.

Date                

Only dates in the format YYYY-MM-DD are supported. Invalid dates/strings may result in a strange date to be shown.

 

In the text style (under ‘format’) you can setup how to present this specific data type - combined with the locale style.

 

 

Decode

The decode field makes it possible to insert text not found in UTF-8 as normally, but you can also insert text in either Base64 encoding or as hexadecimal characters in ISO-8859-1. In this way you can e.g. insert characters, that are e.g. not possible to type in. An example using the decode option is found on the barcode element.