Dynamic Xpath settings for design elements

Dynamic Xpath settings for design elements

You can set multiple settings as an xpath expression for many of the design elements in the normal template designer (for printed and PDF result).

 

For almost all the physical elements you can setup an Xpath expression for the X- and Y-position of the element as described in the section Calculated position.

 

On top of that there is a variable list of settings on the design elements, that can also be set via an Xpath expression in the bottom of the properties of the design element. If these settings are set both as a fixed value and a dynamic Xpath expression, then the Xpath expression overrules the fixed value.

 

If we e.g. consider the text element, then you can setup the font size in the top of the text element here:

 

NG2DynamicDesignerSettings0001

 

 

But in the bottom of the text element you can also set the font size as an Xpath expression:

 

NG2DynamicDesignerSettings0002

This expression selects a smaller font size the longer the variable, text is. In that way we can approximately use the same space for the text no matter how long the text is. This expression of course overrules the fixed value of 18 in the top of the text element.

 

The list of properties, that you can set on an element depends a lot on the design element type.

 

Below is the list of the properties, that you can set dynamically for each design element:

(Apart from the X- and Y-position you can set on almost all if fixed positioning is selected).

 

Barcode element

Module width

Module ratio

Height

Left margin

Right margin

Top margin

Bottom margin

 

Chart element

Font face

Width

Height

 

Container element

Width

Height

Left margin

Right margin

Top margin

Bottom margin

 

Form field element

Font face

Font size

Width

Height

 

Image element

Width

Height

Left margin

Right margin

Top margin

Bottom margin

 

Page element

Size

Height

Width

 

Table element

Left margin

Right margin

Top margin

Bottom margin

Table row element

Height

Table column element

Width

 

Template element

Language

 

Text element

Font face

Font size

Width

Height

Left margin

Right margin

Top margin

Bottom margin

 


    • Related Articles

    • Design elements

      The elements, that you can use to build up a design (or template as they are called in InterFormNG2) are described below. The elements are found on the top of the designer and are marked below with the blue frames: The bottom row is displayed if you ...
    • Design tips

      Here are some tips, that can help you when you make your template designs: 1.Introduction to the designer 2.Create a new template. 3.Open an existing template. 4.Use a grid for aligment. 5.Preview of the merged result. 6.Introduction to fixed and ...
    • Fixed and dynamic positions

      Fixed and dynamic positions : When you insert elements in the InterFormNG2 designer, then you can choose to insert the element in either a fixed or a dynamic position. This is also explained in this video: If you insert a physical element in ...
    • XPath

      In InterFormNG2 you use the language XPath for referencing to data from the XML file. There are many sources of information, if you want to know more about XPath, but you can also simply read the few examples below to have a good idea of how it can ...
    • XPath wizard

      When you in InterFormNG2 insert a value in a field, then you for most have these options: 1.You can insert a fixed text. 2.You can type a dynamic XPath expression where you need to remember each XPath function and the matching parameters. 3.For some ...