Adding Barcodes
Enrichment can add many types of barcodes to a document. Depending on the type of print stream, there are two methods that Enrichment can use to add a barcode: drawn barcodes and font-based barcodes.
Drawn Barcodes
If you print in AFP, Xerox Metacode, PCL, PDF, or PostScript environments, Enrichment can draw the barcode. Drawn barcodes eliminate the need to acquire or modify font resources. To use drawn barcodes, specify the type of barcode you want to add using the <ADDTYPE> tag in the Add tag group. For example, the coding shown in the following figure will add a DataMatrix barcode to the last page of documents in an AFP line data print stream.
<add>
<addtype> PDF417 <! PDF417 barcode. >
<position> 1680 2400 PELS <! Position. >
<addpart> 1234567DFAA343GGA <! Value to encode. >
<orient> 2 <! Vertical orientation. >
<onpage> LAST <! Last page of each document. >
</add>
For more information, see the Enrichment Language Reference Guide discussion on the
<ADDTYPE> tag.Keep the following in mind for drawn barcodes:
- Enrichment can only draw certain barcode types (see Supported Drawn Barcode Types). If you want to add a barcode type that Enrichment cannot draw, use a font-based barcode.
- Using a font for Interleaved 2of5 barcodes requires you to map the characters (generally in a rule file). It is easier to draw this type of barcode.
- Since drawn barcodes do not require a barcode font, there are no size or orientation restrictions.
- Some applications produce line data documents for printing on AFP printers in LINE mode. You must print such documents in PAGE mode to process PTX records added by Enrichment.
Font-Based Barcodes
Font-based barcodes are valid for any print stream type. As specified in the control file, Enrichment uses a font to add the barcode to the document as text. You can add any type of font-based barcode, as long as a corresponding barcode font is available for your printer.
To create a font-based barcode, you must:
- Set the value of a variable to the barcode value
- Add that variable to a document using a barcode font.
<ADDTYPE>TEXT
in conjunction with the <POSLINE> tag or the Insertrec tag group to add font-based barcodes. To create a font-based barcode, specify <ADDTYPE>TEXT and use the <FONTNUM> tag to specify a font that Enrichment will use to print the barcode. For example, the coding shown in the following figure will add a single OMR mark to the last page of documents in an impact print stream.
<add>
<addtype> TEXT <! OMR using a font. >
<posline> 1 40 TRC HORIZONTAL <! Goes on first line. >
<fontnum> 8 <! Font #8 is the OMR font. >
<addpart> 1 <! 1=end of document. >
<onpage> LLAST <! last page of last doc only >
</add>