The ticket template file must be called ticket.xtt.
The voucher template file must be called voucher.xtt.
Templates for labels are ZIP archive files that contain a description of the label layout as XML and all necessary pictures and optionally font files. The XML description must link all other resources in the archive file to make them visible to the system.
The description file must be called template.xml and must be in the root directory of the archive.
<LabelTemplate unit="mm|in|px" size="11 22"> <LoadFont file="nameInsideArchive.ttf"/> <Picture file="nameInsideArchive.png" size="11 22" offset="33 44" smooth="1"/> <Text font="fontFamilyName" fontsize="sizeInPt" offset="11 22" size="33 44" align="left|right|center" valign="top|bottom|center" >some string with @VARIABLES@ to print</Text> <Barcode offset="11 22" size="33 44"/> ... </LabelTemplate>The elements are:
Element | Description |
LabelTemplate | this is the document element, it describes the complete label (actually the current implementation ignores the name of this element) |
LoadFont | loads a font file (only TTF is supported) that is stored in the template ZIP file into the internal font database - it is removed from it after the label is rendered |
Picture | paints a picture file that is stored in the template ZIP onto the label; a number of formats are supported, but it is recommended to use PNG; if size is present it is scaled first - it is recommended to scale, since different printers can have different resolutions and hence the picture will have different sizes; the default scaling algorithm is smooth |
Text | describes text that is rendered on the label |
Barcode | generates a code-39 barcode from the BARCODE variable and scales it onto the label |
The attributes are
Attribute | Description |
unit | describes in what unit sizes and offsets are described in the template, possible values are "mm" (Millimeter), "in" (Inches); the default is "mm". All of them are allowed to use fractions. |
size | describes the size the element is scaled to (or in the case of the complete label: its total size), it is two positive numbers separated by a space: "width height" |
offset | describes the position of the element as "X Y" coordinates. They describe the distance from the upper left corner. |
file | a relative file name within the template ZIP file |
smooth | for Pictures: describes whether the scaling should be done using edged (0) or smooth (1) scaling |
font | contains the name of a font family that is used for rendering the text (eg. "Helvetica"), the font is searched in the complete font database of the host |
fontsize | the height of the text to render in pt (default is 10) |
align | horizontal alignment of the text: "left" starts the text at its offset, "right" places the text left of its offset, "center" puts the horizontal center of the text on the offset |
valign | vertical alignment of the text: "top" puts the text below its offset, "bottom" places the text above of its offset, "center" puts the vertical center of the text on the offset |
Variables for Text elements are enclosed in "@" signs (eg. @VARNAME@).
Variable | Description |
BARCODE | an alias for TICKETID |
TICKETID | the ID of the ticket |
PRICE | the price of the ticket |
ROOM | the room of the tickets event |
TITLE | the title of the tickets event |
DATETIME | the localized date and time when the event starts |
ARTIST | the artist for this event |
PRICECATEGORY | the price category name this ticket is in |
PRICECATEGORYABBR | the abbreviation of the price category this ticket is in |
Variable | Description |
BARCODE | an alias for VOUCHERID |
VOUCHERID | the ID of the voucher |
PRICE | the price of the voucher |
VALUE | the remaining value of the voucher (the system does not store the initial value) |