5.34.11 XML Content

The XML content file requires a mandatory root document element. Child content elements are used to group other XML elements. The ADD command's CONTENT keyword value refers to the name attribute value of the XML content element.


<?xml version="1.0" encoding="utf-8"?>




  <content name="main">




  <content name="logo">






The unit of measurement used for positioning document content is the point.

There are 72 points in 1 inch.

If you want to create a rectangle in PDF that has the size of an A4-page, you have to calculate the number of points:

21 cm / 2.54 = 8.2677 inch, 8.2677 * 72 = 595 points

29.7 cm / 2.54 = 11.6929 inch, 11.6929 * 72 = 842 points

The default border of 36 points corresponds with half an inch.

The X co-ordinate runs from the left side of the page to the right size of the page.

The Y co-ordinate runs from the bottom of the page to the top of the page.

The bottom left hand corner of the page is 0,0 and the top right would be 595, 842 for an A4 page.

All content XML attributes can have dynamic values. LANSA field values can be bound to the attribute's value at runtime by using a {} notation.

The following example shows how to use LANSA field values as attribute values.


<barcode x1="20" y1="500" type="CODE128" value="{FIELD1}"/>


<barcode x1="{FIELD2}" y1="{FIELD3} type="{FIELD4}" value="{FIELD5}"/>


Several Built-In Functions are also available.



<if compare="{@page}" value="11" goto="additional"/>


<phrase value="{@date}" date-format="dd/MM/yyyy"/>