# Image Rendering Reference

## Navigation:

Index General Information Elements Utils Examples

## Barcode Example

his example shows the usage of different barcode types.

- Template: templates/example7.xsl
- Record: records/barcode.xml

## Barcode Example (Template)

<xsl:stylesheet version="2.0" >
<xsl:template match="Record" >
<image height="300" width="400" >
<field height="100" width="100" x="10" y="10" >
<barcode autoscale="true" type="qr" >
<xsl:value-of select="Barcodes/Qr" >
</xsl:value-of>
</barcode>
</field>
<field height="20" valign="bottom" width="100" x="10" y="110" >
<label align="center" >
QR Tag
</label>
</field>
<field height="60" width="100" x="140" y="10" >
<barcode fontName="Tahoma" humanReadableEnabled="true" humanReadablePlacement="top" type="ean13" >
<xsl:value-of select="Barcodes/Ean13" >
</xsl:value-of>
</barcode>
</field>
<field height="20" valign="bottom" width="100" x="140" y="110" >
<label align="center" >
EAN 13
</label>
</field>
<field height="60" width="140" x="250" y="10" >
<barcode fontName="Tahoma" humanReadableEnabled="true" humanReadablePlacement="top" scale="2" type="ean8" >
<xsl:value-of select="Barcodes/Ean8" >
</xsl:value-of>
</barcode>
</field>
<field height="20" valign="bottom" width="100" x="270" y="110" >
<label align="center" >
EAN 8
</label>
</field>
<field height="100" width="125" x="10" y="150" >
<barcode autoscale="true" type="code128" >
<xsl:value-of select="Barcodes/Code128" >
</xsl:value-of>
</barcode>
</field>
<field height="20" valign="bottom" width="125" x="10" y="260" >
<label align="center" >
Code 128
</label>
</field>
<field height="100" width="100" x="140" y="150" >
<barcode autoscale="true" type="datamatrix" >
<xsl:value-of select="Barcodes/DataMatrix" >
</xsl:value-of>
</barcode>
</field>
<field height="20" valign="bottom" width="100" x="140" y="260" >
<label align="center" >
Datamatrix
</label>
</field>
<field height="60" width="100" x="270" y="150" >
<barcode fontName="Times New Roman" humanReadableEnabled="true" humanReadablePlacement="bottom" type="upc-a" >
<xsl:value-of select="Barcodes/Upca" >
</xsl:value-of>
</barcode>
</field>
<field height="20" valign="bottom" width="100" x="270" y="260" >
<label align="center" >
UPC-A
</label>
</field>
</image>
</xsl:template>
</xsl:stylesheet>

## Barcode Example (Record)

<Barcodes>
<Qr>
iMAGOTAG
</Qr>
<Ean13>
5449000000996
</Ean13>
<Ean8>
96385074
</Ean8>
<Code128>
iMAGOTAG
</Code128>
<DataMatrix>
iMAGOTAG
</DataMatrix>
<Upca>
544900000093
</Upca>
</Barcodes>

## Generated Image

## 2.7" server level 3 record example - Chili con carne

A 2.7" template for standard server level 3 records with with raised decimal place and rotated barcode, using Chili con carne record

- Template: templates/example13.xsl
- Record: records/chili-con-carne.xml

## 2.7" server level 3 record example - Chili con carne (Template)

<xsl:stylesheet version="2.0" >
<xsl:template match="Record" >
<xsl:variable name="price" >
<xsl:value-of select="article/field[@key='price']/@value" >
</xsl:value-of>
</xsl:variable>
<xsl:variable name="name" >
<xsl:value-of select="article/field[@key='name']/@value" >
</xsl:value-of>
</xsl:variable>
<xsl:variable name="description" >
<xsl:value-of select="article/field[@key='description']/@value" >
</xsl:value-of>
</xsl:variable>
<image height="176" width="264" font-family="Verdana" >
<field height="80" width="225" x="5" y="7" >
<text font-size="16" font-weight="bold" condense="1.0, 0.9, 0.8, 0.7" line-spacing="-1" padding-bottom="5" >
<xsl:value-of select="$name" >
</xsl:value-of>
</text>
<text font-size="14" font-weight="normal" condense="1.0, 0.9, 0.8, 0.7" line-spacing="-1" padding-bottom="5" >
<xsl:value-of select="$description" >
</xsl:value-of>
</text>
</field>
<field height="100" width="140" x="0" y="75" >
<text align="right" font-family="Lucida Sans" font-size="80" font-weight="bold" condense="1.0" >
<xsl:value-of select="substring-before($price, '.')" >
</xsl:value-of>
</text>
</field>
<field height="80" width="20" x="135" y="95" >
<text align="center" font-family="Lucida Sans" font-size="60" font-weight="bold" condense="1.0" >
.
</text>
</field>
<field height="90" width="80" x="135" y="79" >
<label align="left" font-family="Lucida Sans" font-size="52" font-weight="bold" condense="0.9" >
<xsl:value-of select="substring-after($price, '.')" >
</xsl:value-of>
</label>
</field>
<field align="center" valign="center" rotation="270" height="25" width="150" x="230" y="17" >
<barcode scale="1" humanReadableEnabled="false" type="code128" >
1234567890ABCD
</barcode>
</field>
<field height="14" width="100" y="160" x="5" >
<label align="left" font-size="10" font-weight="normal" >
<xsl:value-of select="article/@articleNumber" >
</xsl:value-of>
</label>
</field>
</image>
</xsl:template>
</xsl:stylesheet>

## 2.7" server level 3 record example - Chili con carne (Record)

<article articleNumber="9000275639319" >
<field key="pricePerUnit" value="4.98" >
</field>
<field key="unit" value="1 kg" >
</field>
<field key="price" value="2.49" >
</field>
<field key="description" value="Dose 500 g" >
</field>
<field key="name" value="Chili con Carne" >
</field>
</article>

## Generated Image

## 2.7" server level 3 record example - Red bull

A 2.7" template for standard server level 3 records with with raised decimal place and rotated barcode, using Red bull record

- Template: templates/example13.xsl
- Record: records/red-bull.xml

## 2.7" server level 3 record example - Red bull (Template)

<xsl:stylesheet version="2.0" >
<xsl:template match="Record" >
<xsl:variable name="price" >
<xsl:value-of select="article/field[@key='price']/@value" >
</xsl:value-of>
</xsl:variable>
<xsl:variable name="name" >
<xsl:value-of select="article/field[@key='name']/@value" >
</xsl:value-of>
</xsl:variable>
<xsl:variable name="description" >
<xsl:value-of select="article/field[@key='description']/@value" >
</xsl:value-of>
</xsl:variable>
<image height="176" width="264" font-family="Verdana" >
<field height="80" width="225" x="5" y="7" >
<text font-size="16" font-weight="bold" condense="1.0, 0.9, 0.8, 0.7" line-spacing="-1" padding-bottom="5" >
<xsl:value-of select="$name" >
</xsl:value-of>
</text>
<text font-size="14" font-weight="normal" condense="1.0, 0.9, 0.8, 0.7" line-spacing="-1" padding-bottom="5" >
<xsl:value-of select="$description" >
</xsl:value-of>
</text>
</field>
<field height="100" width="140" x="0" y="75" >
<text align="right" font-family="Lucida Sans" font-size="80" font-weight="bold" condense="1.0" >
<xsl:value-of select="substring-before($price, '.')" >
</xsl:value-of>
</text>
</field>
<field height="80" width="20" x="135" y="95" >
<text align="center" font-family="Lucida Sans" font-size="60" font-weight="bold" condense="1.0" >
.
</text>
</field>
<field height="90" width="80" x="135" y="79" >
<label align="left" font-family="Lucida Sans" font-size="52" font-weight="bold" condense="0.9" >
<xsl:value-of select="substring-after($price, '.')" >
</xsl:value-of>
</label>
</field>
<field align="center" valign="center" rotation="270" height="25" width="150" x="230" y="17" >
<barcode scale="1" humanReadableEnabled="false" type="code128" >
1234567890ABCD
</barcode>
</field>
<field height="14" width="100" y="160" x="5" >
<label align="left" font-size="10" font-weight="normal" >
<xsl:value-of select="article/@articleNumber" >
</xsl:value-of>
</label>
</field>
</image>
</xsl:template>
</xsl:stylesheet>

## 2.7" server level 3 record example - Red bull (Record)

<article articleNumber="9002490100070" >
<field key="pricePerUnit" value="5.56" >
</field>
<field key="unit" value="1 l" >
</field>
<field key="price" value="1.39" >
</field>
<field key="description" value="Dose 250 ml" >
</field>
<field key="name" value="Red Bull" >
</field>
<field key="sale" value="1" >
</field>
</article>

## Generated Image

## 2.7" server level 3 record example - Vöslauer

A 2.7" template for standard server level 3 records with with raised decimal place and rotated barcode, using Vöslauer record

- Template: templates/example13.xsl
- Record: records/voeslauer.xml

## 2.7" server level 3 record example - Vöslauer (Template)

<xsl:stylesheet version="2.0" >
<xsl:template match="Record" >
<xsl:variable name="price" >
<xsl:value-of select="article/field[@key='price']/@value" >
</xsl:value-of>
</xsl:variable>
<xsl:variable name="name" >
<xsl:value-of select="article/field[@key='name']/@value" >
</xsl:value-of>
</xsl:variable>
<xsl:variable name="description" >
<xsl:value-of select="article/field[@key='description']/@value" >
</xsl:value-of>
</xsl:variable>
<image height="176" width="264" font-family="Verdana" >
<field height="80" width="225" x="5" y="7" >
<text font-size="16" font-weight="bold" condense="1.0, 0.9, 0.8, 0.7" line-spacing="-1" padding-bottom="5" >
<xsl:value-of select="$name" >
</xsl:value-of>
</text>
<text font-size="14" font-weight="normal" condense="1.0, 0.9, 0.8, 0.7" line-spacing="-1" padding-bottom="5" >
<xsl:value-of select="$description" >
</xsl:value-of>
</text>
</field>
<field height="100" width="140" x="0" y="75" >
<text align="right" font-family="Lucida Sans" font-size="80" font-weight="bold" condense="1.0" >
<xsl:value-of select="substring-before($price, '.')" >
</xsl:value-of>
</text>
</field>
<field height="80" width="20" x="135" y="95" >
<text align="center" font-family="Lucida Sans" font-size="60" font-weight="bold" condense="1.0" >
.
</text>
</field>
<field height="90" width="80" x="135" y="79" >
<label align="left" font-family="Lucida Sans" font-size="52" font-weight="bold" condense="0.9" >
<xsl:value-of select="substring-after($price, '.')" >
</xsl:value-of>
</label>
</field>
<field align="center" valign="center" rotation="270" height="25" width="150" x="230" y="17" >
<barcode scale="1" humanReadableEnabled="false" type="code128" >
1234567890ABCD
</barcode>
</field>
<field height="14" width="100" y="160" x="5" >
<label align="left" font-size="10" font-weight="normal" >
<xsl:value-of select="article/@articleNumber" >
</xsl:value-of>
</label>
</field>
</image>
</xsl:template>
</xsl:stylesheet>

## 2.7" server level 3 record example - Vöslauer (Record)

<article articleNumber="9009700145104" >
<field key="pricePerUnit" value="0.35" >
</field>
<field key="unit" value="1 l" >
</field>
<field key="price" value="0.35" >
</field>
<field key="description" value="Vöslauer prickelnd, 1 l PET" >
</field>
<field key="name" value="Vöslauer Mineralwasser" >
</field>
</article>

## Generated Image