Appendix A. Input Format for ECI and Macro PDF417

Extended Character Interpretation (ECI) and Macro PDF417 are optional features defined in PDF417 specification. ECI allows content of mixed encoding types (for example different languages) encoded in the symbol. Macro PDF417 defines a standard method to split large amount data into multiple symbols that can be decoded and concatenated without relying on the order of scan. Both features require support of the scanner.

The two features must be entered using the special syntax outlined below.

A.1. Extended Channel Interpretation (ECI)

ECI was introduced to allow output data stream to have interpretations different from the default character set (ISO8859-1). An ECI can be any number between 0 and 999999. The tilde code sequence ~7nnnnnn is used to enter the ECI value. The tilde code sequence can appear at any places of the input, provided that exact 6 digits follows ~7. For example to start an interpretation , enter ~7000010.

A.2. Macro PDF417

Using Macro PDF417, large amount data is split into several file segments and encoded into individual symbols. To create Macro PDF417 symbols, you need to enter the control block information using ~2 tilde code sequence. A sample input looks like this:

12345678901234567890~2[3][LA-CONFIDENTIAL][6][fn:part2|ts:199044|ad:Justin Power|fs:110990]


The tilde code sequence for Macro PDF417 control block information is as follows:


The ~2 must appear at the end of the message. The data after the control block is ignored. The first three fields are required. The last field is optional and can contain several additional sub-fields.

Segment Index (SI)

In Macro PDF417, each symbol represents a segment of the whole file. To rebuild the whole file, the segment must be constructed in proper order. The value of segment index is 0 based. For example, for a file divided into k segments, the segment index can be any number between 0 and k-1.

The value allowed for SI is between 0 and 99.

File ID (FID)

All symbols belong to the same group have the same file ID. The File ID can be any string, such as archive2. Although the standard does not set a limit on the length of the File ID, keep in mind that the control block reduces the overall symbol capacity.

Total Segments (TS)

The total segments field is required for every symbol in the group. It should remain constant among all symbols.

Optional Fields

Macro PDF417 defines several optional fields to encode additional file information such as file name, timestamp, file size and checksum. All these fields must be at the end of the control block. If more than two optional fields are present, they should be separated with vertical bars |. Within a field, a colon : divides the name part and value part.

The acceptable field names are listed below:

Table A.1. Optional Fields in Macro PDF417

Field DesignatorField Name (abbreviated)Field Name (normal)CommentData Type
0fnfilenameFile Namestring
1scsegmentcountSegment Countnumber
2tstimestampTime Stampnumber
5fsfilesizeFile Sizenumber

For example, [|ts:20051231||cs:9901234] encodes 4 optional fields: file name (, time stamp (20051231), sender ( and checksum (9901234).