Building/Printing a Bar Code

This section describes the methods used to build/print bar codes.

Building a Bar Code

The Bar Code Printing function generates bar codes according to the set PCL font parameters. The PCL font parameters used in this system differ from the generally accepted standards, except for the v and T parameters. The T parameter selects the bar code format, while the v parameter controls the bar height and the number of rows or columns that are used for the bar code.
Some formats require a checksum. A checksum is a value, which is the result of a complex calculation of the coded data. This value is added to the end of the coded data and used by a code reader to validate the bar code. This system automatically calculates the checksum(s) of bar codes that need it. Bar codes can have up to two checksums (MSI Plessey and UCC128). If the checksum is included in fixed length data (EAN 8/13 and UPC), it is ignored.
If required, the system prints the checksum value as centered text with the bars, either as half-embedded or fully embedded characters, and located either under or above the bars. Checksum and flag characters are automatically placed in the right position in some systems (EAN 8/13 and UPC), according to international standards. Automatic sizing limits the embedded text point size to 15. There is no size limit for text that is located above or under the bar code.
Data is analyzed to verify whether it conforms to the following bar code specifications:
The data must be of the correct size, depending on the desired format. For example, Interleaved 2 of 5 must have an even number of digits, whereas EAN 8/13 and UPC have fixed lengths.
The data must be valid. Some systems, such as UPC-E, accept only specially structured data. For example, the first five digits on the left side of the bar code are calculated based on the equivalent UPC number.
Data consists of only numeric or alphanumeric characters.

Printing a Bar Code

This section describes how the Bar Code Printing function prints a bar code.

Cursor Position

Before a bar code is printed, the cursor is located in the bottom left corner under the leftmost black bar, regardless of the bar code text parameter that is provided. After a bar code is printed, the cursor moves to the bottom right corner under the rightmost black bar. If you need to print another bar code, move the cursor to a new position and send the bar code data. The bar code's PCL font parameter does not need to be sent again.

Transparent Print Data Mode

The following bar code formats support the full 128 character set, from ASCII code 0 to ASCII code 127, or full binary data (ASCII code 0 to ASCII code 255): Extended 39, Extended 93, 128A, PDF417, 128auto, MaxiCode, EAN/UCC128, Data Matrix, Aztec, Codablock, and QRcode.
If you want to print special characters (ASCII code < 32) with any of the bar code formats mentioned above, a Transparent Print Data PCL sequence (<Esc>&p#X, where <Esc> is replaced by the ASCII character 27 decimal, and where "#" is replaced with the number of data bytes that follow, until the next escape sequence), must be immediately followed by the font selection sequence. This is the only way for the system to determine how many characters must be printed as bar codes.
NOTE
A typeface range (24,580 to 24,900) is activated in combination with a PCL font call sequence:
<Esc>(s#p#h#v#b#s#T, where "#" represents the parameters
In this manual, the escape code is preceded by <Esc>. The characters must not be entered as individual symbols, but must be replaced by the ASCII character 27 decimal.
The end of the bar code data determines the bar code type.
Numeric bar code data: ends with space/CR/LF/FF/escape code
Alphanumeric bar code data: ends with CR/LF/FF/escape code
The bar code can be of any height within the 3 to 960 point size range (1 point size = 1/72").
Every bar code system has default options, which are activated when parameters are not provided. Therefore, you do not need to provide all parameters. For example, if the height is omitted, the default size is used.
If data is invalid (e.g., incorrect size or invalid characters), an X is printed on the bar code, and an error message describing the problem is automatically added below the bar code. This prevents you from printing invalid bar codes by mistake.

Presentation

Each bar code format can be enlarged to any height from 1/25" to 13" (1 mm to 33 cm) in 1/72" increments. Bar widths can be enlarged in 1/600" units, and code values can be printed as text together with differently embedded codes in 20 different scalable fonts.
However, bar codes are not made up of scalable fonts. Typeface numbers from 24,580 to 24,900 activate the bar code. All data that is linked to a typeface number is analyzed and converted into a bar code directly by the PCL controller.

Bar Code Readability

Bar codes consist of a series of lines or dots with blank spaces. Therefore, the settings and the condition of the printer may affect readability. We recommend that you first run a readability test before you print the bar codes. If the test print results do not turn out as expected, adjust the following settings to improve readability:
Toner density
Color and type of paper used
CAUTION
Canon does not guarantee and has not tested that the bar codes, OCR-A and OCR-B, contained or generated by this Bar Code Printing function are readable by all reading devices.
Canon recommends that you test the read/write compatibility of these bar codes and fonts before implementing their applications.
13XW-003