Appendix B. Font Character Set


The glyph structures described here apply on PDF417 Fontware 4.0. Beginning with 4.0, the glyph structures are changed to overcome restrictions imposed by some printing software.

In some circumstances, it is desirable to substitute the font with the custom drawing routines. This section explains the mapping of each character in the font.

The basic element in a PDF417 barcode is a rectangle cell called module, in either black or white. If 1 represents a black module and 0 represents a white module, we can use an array of strings to represent a PDF417 barcode. The result is further compressed by combining adjacent cells into a character. In a PDF417 font (version 4.0), four vertical modules are merged into one character, as illustrated below:

Figure B.1. PDF417 Font (V4) Character Set

PDF417 Font (V4) Character Set

The PDF417 font uses 16 characters (0-9, A-F) to represent 16 possible scenarios. To draw a PDF417 barcode from the encoding results, you have two options:

  • Convert the encoding results to an array of string consisting of 1 and 0 only, and draw cells from the left to the right, and from the top to the bottom.

  • Create a drawing routine to draw these 16 glyphs. Scan the encoding results and call the routine one by one.

When designing drawing routines, you may also consider joining adjacent dark cells into polygons to reduce the number of drawing commands.


Be ware that the cell is a rectangle instead of a square. The height of a cell is yHeight times of the width. If you are writing bitmaps from the barcode string, make sure to round the height into integral times of pixels and the height of all cells should be consistents in the whole symbol.

For the list of yHeight and X dimensions of the PDF417 fonts, see Table 2.1, “List of PDF417 fonts”.