Print layout syntax Print layout example
<?xml
version="1.0"
encoding="utf-8"?> Minimal print layout
Tags The XML configuration file is structured as follows:
|
Name | Mandatory, not empty | Name of the print layout |
Remark | Optional | Comment on the print layout |
<PrinterResolution> | 1 ... | |
N | ||
for defining the printer resolution |
hDPI | Mand|
, fixed value "300" | Horizontal resolution in DPI [dots per inch] Only the resolution 300 DPI is supported! |
vDPI | Mandatory, fixed value "300" | Vertical resolution in DPI [dots per inch] Only the resolution 300 DPI is supported! | |
<PrinterParameter> | Optional, 0..1 | Container Element for printer-specific parameters | |
<Parameter> | Optional, 0..N | Element for printer-specific parameters |
Name | Mandatory, name of the printer-specific parameter. |
Value | Mandatory | Depending on the parameter name | |
<Canvas> | 1 | Element for virtual drawing area. |
All position specifications of the <Image> and <Text> elements refer to the top left corner of this canvas. | ||||
hPrintOffset | Mandatory | Horizontal print offset in [mm] from the right letter edge, see dimensioning. If no automatic print offset is switched on or the automatic print offset does not find a free area, it is printed at the position defined here | ||
Height | Mandatory | Height of the drawing area in [mm], see | ||
dimensioning | ||||
Width | Mandatory | Width of the drawing area in [mm], see dimensioning. | ||
<LoadFont> | 0 ... | N | Element for font. | |
All fonts used by the <Text> elements must be loaded beforehand with <LoadFont>! | ||||
FontNr | Mandatory | |||
Internal number of the font, this is referenced by the <Text> elements | ||||
File | Mandatory | File name of the font. | ||
Font files must be in the internal XiJet format (XFT). | ||||
Rotation | ||||
Mandatory | ||||
Alignment/rotation of the font in degrees [ยบ]. | ||||
Permitted values: "0", "90", "180", "270" | ||||
<Image> | 0..N | Element for images, images must be saved in Windows BMP format! | ||
File | Mandatory | File name of the image | ||
hPos | Mandatory | Horizontal position in [mm] of the image in the drawing area relative to the top left corner of the canvas | ||
vPos | Mandatory | Vertical position in [mm] of the image in the drawing area relative to the top left corner of the canvas. | ||
Height | Optional | Height of the image in [mm]. If defined, the image is printed up to a maximum of this height, the rest is cut off | ||
If not defined, the entire image is printed | ||||
Width | Optional | Width of the image in [mm]. If defined, thed image is printed up to a maximum of this width, the rest is cut off. | ||
not defined, the entire image | ||||
<Text> | 0 ... | |||
N | Element for static or dynamic text | The fonts used must |
FontNr | Mandatory | Reference to font loaded via <LoadFont>. |
String | Optional | Static text to be printed |
Variable | Optional | Dynamic text to be printed. |
The attribute defines the shipment attribute that is printed. See print variables for permitted values. Example: - "UPOC": UPOC of the shipment - "SIx": Sort info SIx of the shipment | |||
Top | Mandatory | positioning/bounding box: Vertical position of the top left corner of the text field relative to the canvas [mm], see dimensioning. |
Left | Mandatory | positioning/bounding box: |
Horizontal position of the upper left corner of the text field relative to the canvas [mm], see | ||
. |
Bottom | Mandatory |
: Vertical position of the lower right corner of the text field relative to the canvas [mm]. |
Right | Mandatory | positioning/BoundingBox: |
Horizontal position of the bottom right corner of the text field relative to the canvas [mm]. |
Align | Optional | Optional attribute, if not defined, "Left" is used as the default |
Permitted values: "Left", "Center", "Right" |
Reverse | Optional | 0= normal, 1= reverse colors |
Wrap | Optional | Optional attrib
, if not defined is used as default "0" (No Warp). Permitted values: "0", "1" 0 = No wrapping, , when text reaches the edge of the bounding box the text is cplipped 1 = Wrap text. | |
When text reaches the edge of the bounding box that word is automatically moved to the next line. |
Mirror | Optional | Optional attrib |
defined is used as default | ||
"0" (Not mirror | ||
) | ||
. Allowed values: "0", "1" 0 = Not mirror 1 = Mirror the resulting image about the center of the horizontal bounds. |
BottomJustify |
Optional |
Optional attribute, if not defined is used as default "0" (No BottomJustify) |
values: "0", "1" 0 = No BottomJustify 1 = Lines of text will be bottom justified ('Bottom' is a relative term, as it relates to rotation of 0). | ||
BarcodeType | Optional | Defines whether the text is interpreted as a barcode. Permitted values: "", "Interleaved2of5" |
The height of the printable area is fixed at 1.5 inches = 38 mm
.To make full use of the print area, 38 is therefore a sensible value for <Canvas>.Height.
180 degree rotated text
Thefollowing XML tags/attributes must be adapted for printing 180 degree rotated text:
<LoadFont>.Rotation
The attribute <LoadFont>.Rotation must be set to 180!
<Text>.Bottom
The attribute Text.Bottom
.Top
The height of the font used is taken into account internally by the printer.
values for Text.Bottom in the range from approx. 6 to 40, Text.Top can be set to 0.
<Text>.Right
Use the Text.Right attribute instead of Text.Left!
The length of the text used is taken into account internally by the printer
This results in sensible values for Text. Right in the range from approx. 100 to 200, Text.Left can be set to 0.
Example:
<?xml version="1.0" encoding="utf-8"?>
<PrinterResolution hDPI="300" vDPI="300">
<Canvas Height="38.1" Width="210">
<!-- 180 Grad Fonts -->
</Canvas>
</PrinterResolution>
See also:
![]() |
CodX Software AG Sinserstrasse 47 6330 Cham Switzerland |
support http://support.codx.ch |
![]() |