TBarcode2D_PDF417

PDF417The component is used to create the PDF417 Barcode symbols. It is defined in the pPDF417 unit.

PDF417 is a continuous, stacked 2D linear barcode symbol format used in a variety of applications, primarily transport, identification cards, and inventory management. PDF stands for Portable Data File. It can encode all 8-bit values.

The PDF417 symbology was invented by Dr. Ynjiun P. Wang at Symbol Technologies in 1991.


Symbol size

Each PDF417 symbol consists of a stack of vertically aligned rows with a minimum of 3 rows (maximum 90 rows). Each stacked row shall include a minimum of 1 symbol character column (maximum 30 symbol character columns), excluding start, stop and row indicator columns. They are defined in the pPDF417Custom unit. The RowHeight property can be used to specify the height for each stacked row, in modules. See diagram:

PDF417 Barcode Symbol

You can use the MinRows and the MaxRows properties to specifiy the minimum and maximum number of stacked rows for a PDF417 symbol. And use the MinColumns and the MaxColumns properties to specifiy the minimum and maximum number of symbol character columns for it. In other words, the MinRows and MinColumns properties specify a minimum symbol size, and the MaxRows and MaxColumns properties specify a maximum symbol size. According to the priority order specified by the StretchOrder property, the first symbol size that accommodates the barcode text will be automatically selected between the minimum symbol size and the maximum symbol size.

You can use the CurrentRows property to get the factual number of stacked rows. And use the CurrentColumns property to get the factual number of columns.

If the barcode text is so long that it cannot be encoded using the maximum symbol size specified by the MaxRows and the MaxColumns properties, an OnInvalidLength or OnInvalidDataLength (only for Delphi/C++ Builder 2009 or later) event will occur.


Quiet zones

The symbol shall include a quiet zone on all four sides. The minimum quiet zone is equal to 4 modules on all four sides. So the minimum values of LeadingQuietZone, TrailingQuietZone, TopQuietZone, and BottomQuietZone properties are equal to 4.


Error checking and correcting (ECC)

PDF417 symbols offer 9 levels of error correction, referred to as ECC 0 to ECC 8 respectively in increasing order of recovery capacity. You can use the ECCLevel property to specify the error correction code level for a PDF417 symbol. It can be one of values from elEcc_0 to elEcc_8, corresponding to error correction code level from ECC 0 to ECC 8. They are defined in the pPDF417Custom unit.

If the ECCLevelUpgrade property is set to true, the highest error correction code level that can be accommodated by current symbol size will by used for creating more robust symbols. Note, the new level is always no lower than the level specified by the ECCLevel property, and the symbol size will not be increased, it may be determined based on the length of barcode text, and the error correction code level specified by the ECCLevel property, in other words, only the remaining capacity in current symbol size will be used to upgrade the error correction code level. The CurrentECCLevel property can be used to get the factual error correction code level.


Character set

Escape sequences

If the AllowEscape property is set to true, following escape sequences are supported by the component, you can insert them to the barcode text:

Note, the "{RS}" is ASCII character RS (ASCII value 30), the "{GS}" is ASCII character GS (ASCII value 29), and the "{EOT}" is ASCII character EOT (ASCII value 4).


Extended Channel Interpretation (ECI)

The Extended Channel Interpretation (ECI) protocol allows the output data stream to have interpretations different from that of the default character set. Five broad types of interpretations are supported in PDF417:

The ECI is identified by an integer (up to 6 digits) which is encoded in the PDF417 by the ECI indicator block. The escape sequence "\e[<ECI_Number>]" is used to place the ECI indicator block to the barcode text:

ECI indicator blocks may be placed anywhere in the barcode text in a single or Macro PDF417 set of symbols. For example:

ABC\e[123]DEFabc\e[000003]def

Normally, the sub-mode invoked immediately prior to the ECI escape sequence is preserved for the encodation immediately after it. Thus, sub-mode latches and shifts are preserved across an ECI escape sequence; and thus a sub-mode shift immediately before an ECI escape sequence is not ignored. If the value "poIgnoreShiftBeforeECI" is included in the Options property, the sub-mode shift immediately before an ECI escape sequence is ignored, but a sub-mode latch immediately before an ECI escape sequence is never ignored.

The AllowEscape property should be set to true in order to place the ECI indicator blocks. Any ECI invoked shall apply until the end of the barcode text, or until another ECI indicator block is encountered. Thus the interpretation of the ECI may straddle two or more symbols.


Compact PDF417

Compact PDF417In an environment where space considerations are a primary concern and symbol damage is unlikely (e.g. an office), the right row indicators may be omitted and the stop pattern may be reduced to one module width bar. This reduction version is called Compact PDF417, which is fully decoder compatible with standard PDF417.

Note, the Compact PDF417 was referred as Truncated PDF417 in previous standard.

You can set the Compact property to true in order to generate a Compact PDF417 symbol.


Macro PDF417

Macro PDF417 provides a mechanism for the data in a file too large to be split into blocks and be represented in more than one PDF417 symbol. This mechanism is similar to the structured append feature in other symbologies. Up to 99999 individual PDF417 symbols may be used to encode data in Macro PDF417.

Each Macro PDF417 symbol shall contain additional control information to enable the original data file to be properly reconstructed, irrespective of the sequence in which the individual PDF417 symbols are scanned and decoded. The escape sequence "\s[<Index>, <File_ID>, <File_Name>, <Amount>, <Time_Stamp>, <Sender>, <Address>, <File_Size>, <Checksum>]" is used to place the control information to the barcode text:

The ECI escape sequences, "\900", "\901", "\902", and "\924" can be used in the File_Name, Sender and Address fields. If you want place the comma in these fields, please use the "\," instead.

An empty string indicates an unused optional field, the subsequent comma can be omitted if all fields of succeeding are unused. otherwise, the comma is required. All unused fields at the end can be omitted.

The control information may only be placed once in the barcode text. Also, it shall be placed at end of the barcode text. The OnInvalidChar or OnInvalidDataChar (only for Delphi/C++ Builder 2009 or later) event will occur if the control information be placed more than once or it isn't placed at end of the barcode text.

The following is an example of Marco PDF417 symbol:

ABCDEFGHIJKLMN\s[2,001287023,,5,2008-12-03 05:30:00,,USA]

Note, if the segment count is unused, a Marco PDF417 terminator, "\t" escape sequence is required in last symbol within the set of Marco PDF417 symbols. Otherwise, it's optional. The "\t" escape sequence shall be placed at the end of the barcode text, after the control information. For example:

ABCDEFGHIJKLMN\s[5,001287023]\t

The AllowEscape property should be set to true in order to place the control information and the terminator.


Properties:
Methods:
Events:

(*): The Data property, OnInvalidDataLength and OnInvalidDataChar events are available only for the Delphi/C++ Builder 2009 or later.

Contents