This is a sample for adding DataMatrix barcodes.
<input>
<name> input
<file> inputfile.afp
<type> A
<density> 240
</input>
<rule>
<content>
%%barcodeVariable = %%DOCUMENT_NO
</content>
</rule>
<output>
<name> output
<file> output.afp
<add>
<addtype> D
<addpart> "A DataMatrix Barcode"
<datamatrix> Y
<cellsize> 10 pels
<position> 1 1 in
</add>
<add>
<addtype> D
<addpart> %%barcodeVariable 5 R 0
<datamatrix> Y
<cellsize> 8 pels
<position> 1 9 in
</add>
</output>
The first one is using a constant. The second is using a variable constructed in the rule file.
The <addtype> tag specifies it will be a DataMatrix barcode.
The <datamatrix> barcode specifies it will be square. There are additional parameters that could specify a higher than default error correction, or a different than default character encoding. Normally, it is best to accept the defaults here, which will result in the smallest barcode, but specific applications may require a higher error correction, or a particular character encoding.
The <cellsize> tag specifies how large an individual cell (or square) in the barcode will be. This is normally specified in pels, in (inches), or mm.
The <position> tag specifies where on the page the barcode will be applied. For Enrichment, the page origin is treated as the upper left corner of the page.
------------------------------
Eric Olson
Senior Principal Software Engineer
Precisely Software Inc.
------------------------------