The component is used to create the MicroPDF417 Barcode symbols. It is defined in the pMicroPDF417 unit.
MicroPDF417 is a multi-row symbology, derived from and closely based on PDF417. MicroPDF417 is designed for applications with a need for improved area efficiency but without the requirement for PDF417's maximum data capacity. A limited set of symbol sizes is available, together with a fixed level of error correction for each symbol size. Module dimensions are user-specified to enable symbol production and reading by a wide variety of techniques.
MicroPDF417 symbols shall conform with certain predefined combinations of number of stacked rows, columns, and number of error-correction codewords, referred to as symbol sizes. The symbol size values from mpSize_1_11 to mpSize_4_44 corresponding to these symbol sizes, and denotation the number of columns and rows in every symbol size. For example, the symbol size value mpSize_2_23 denotations the MicroPDF417 symbol size is 23 stacked rows by 2 columns. These symbol size values are defined in the pMicroPDF417 unit.
The RowHeight property can be used to specify the height for each row, in modules.
You can use the MinSize property to specify a minimum symbol size, and use the MaxSize property to specifiy 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 CurrentSize property to get the factual symbol size.
If the barcode text is so long that it cannot be encoded using the maximum symbol size specified by the MaxSize property, an OnInvalidLength or OnInvalidDataLength (only for Delphi/C++ Builder 2009 or later) event will occur.
The symbol shall include a quiet zone on all four sides. The minimum quiet zone is equal to 1 module on all four sides. So the minimum values of LeadingQuietZone, TrailingQuietZone, TopQuietZone, and BottomQuietZone properties are equal to 1.
Each MicroPDF417 symbol contains at least seven error correction codewords. The error correction codewords provide capability for both error detection and correction. The number of error correction codewords for a MicroPDF417 symbol is fixed for each symbol size.
All 8-bit values can be encoded. The default interpretation shall be:
This interpretation corresponds to ECI 000003.
MicroPDF417 has three unique data compaction modes as Text compaction mode, Numeric compaction mode, and Byte compaction mode. All 8-bit values are encoded by switching internally between all 3 compaction modes:
Text compaction mode: Permits all printable ASCII characters, i.e. ASCII values from 32 to 126 inclusive accordance with ISO/IEC 646, as well as selected control characters (CR, HT, and LF).
The mode has four sub-modes:
The sub-mode will be switched automatically in order to minimize the symbol size.
Numeric compaction mode: Permits efficient encoding of numeric data string.
Byte compaction mode: Permits all 256 possible 8-bit byte values to be encoded. This includes all ASCII characters value from 0 to 127 inclusive and provides for international character set support.
In the specification of MicroPDF417, the initial compaction mode in effect at the start of each symbol shall always be Byte compaction mode. You can change the initial compaction mode by using the DefaultEncodeMode and DefaultTextEncodeMode properties, in order to macth the reader. If the poMicroPDF417Explicit901 value is included in the Options property, a mode latch to Byte compaction mode "\901" will be explicitly inserted into beginning of barcode text, in order to work with any reader.
The compaction mode will be switched automatically in a MicroPDF417 symbol in order to minimize the symbol size. Also, you can manually switch the code set by using escape sequences "\900", "\901", "\902", and "\924". See also the "Escape sequences" section below.
The FNC1 characters can be encoded for compatibility with some existing applications. There are two mode FNC1 characters to identify symbols encoding messages formatted according to specific predefined industry or application specifications, also the FNC1 character can be used as the data field separator:
First position mode: FNC1 in this mode indicator identifies symbols encoding data formatted according to the GS1 Application Identifiers standard. For this purpose, it shall only be used once in a symbol and shall be placed at beginning of the barcode text.
If any one of escape sequences in "\903", "\904" and "\905" followed by an Application Identifier (2 or more digits) is placed at beginning of barcode text, it represents a leading FNC1 character in "First position" mode, and implies a mode latch to Text compaction mode or Numeric compaction mode. See also the "Escape sequences" section below.
Also, you can place an escape sequence \f" followed by an Application Identifier (2 or more digits) at beginning of barcode text instead of the "\903", "\904" or "\905" escape sequence followed by the Application Identifier, to place the FNC1 character in "First position" mode. The component will automatically select one of escape sequences from "\903", "\904" and "\905" depending on on the barcode text, in order to minimize the symbol size.
The escape sequences "\906", "\907", "\912", "\914" and "\915" can be placed the FNC1 character in "First position" mode too. See also the "Escape sequences" section below.
Second position mode: FNC1 in this mode indicator identifies symbols formatted in accordance with specific industry or application specifications previously agreed with AIM International. It is immediately followed by an application indicator assigned to identify the specification concerned by AIM International. For this purpose, it shall only be used once in a symbol and shall be placed at beginning of the barcode. An application indicator may take the form of any single Latin alphabetic character from the set "a" to "z" and "A" to "Z", or a two-digit number.
If any one of escape sequences in "\908" and "\909" followed by an application indicator (single Latin alphabetic character from the set "a" to "z" and "A" to "Z", or a two-digit number) is placed at beginning of barcode text, it represents a leading FNC1 character in "Second position" mode, and implies a mode latch to Text compaction mode or Numeric compaction mode. See also the "Escape sequences" section below.
Data field separator: The FNC1 character may also be used as a data field separator (i.e. at the end of a variable-length data field), in which case it will be represented in the transmitted message as GS character (ASCII value 29). The data field separator shall not be placed at beginning of barcode text.
If any one of escape sequences in "\903", "\904" and "\905" is placed in the barcode text, but not at beginning of the barcode text, it represents a data field separator, and implies a mode latch to Text compaction mode or Numeric compaction mode. See also the "Escape sequences" section below.
Also, you can use the escape sequence "\f" instead of the "\903", "\904" or "\905" to placed the FNC1 character as the data field separator. The component will automatically select one of escape sequences from "\903", "\904" and "\905" based on the barcode text, in order to minimize the symbol size.
The appearance of an adjacent pair of repeated "\903", "\904" or "\905" escape sequences will cause the decoder to divide the transmission at that point, but without transmitting the two implied GS (ASCII value 29) characters themselves.
The ECI indicator blocks can be encoded for the standardized encoding of message interpretation information. The escape sequence "\e[<ECI_Numnerm>]" can be used to place the ECI indicator block to barcode text. See also the "Extended Channel Interpretation (ECI)" section below.
If the AllowEscape property is set to true, following escape sequences are supported by the component, you can insert them to the barcode text:
\\: Insert a backslash to barcode text.
\5: Insert a 05 macro to barcode text. It's used to abbreviate the industry specific header "[)>{RS}05{GS}" and trailer "{RS}{EOT}", in order to reduce the size of symbol. It must only be placed once at beginning of the barcode text and it shall not be used in conjunction with a series of structured append symbols.
\6: Insert a 06 macro to barcode text. It's used to abbreviate the industry specific header "[)>{RS}06{GS}" and trailer "{RS}{EOT}", in order to reduce the size of symbol. It shall only be placed once at beginning of the barcode text and it shall not be used in conjunction with a series of structured append symbols.
\r: Instructs the reader to interpret the data contained within the MicroPDF417 symbol as programming for reader initialisation. It shall only be placed once at beginning of the barcode text. In the case of a structured append initialisation sequence, it shall appear in every symbol.
\e[<ECI_Numnerm>]: Insert an ECI indicator block to barcode text. See also the "Extended Channel Interpretation (ECI)" section below.
\f: Insert a FNC1 character either in "First position" mode or as a data field separator, to the barcode text. One of "\903", "\904", and "\905" will be automatically selected instead of the "\f", to insert to the symbol, depending on the barcode text. If it's placed at beginning of barcode text, it represents a FNC1 character in "First position" mode, otherwise, it represents a data field separator. See also the "Character set" section above.
Note, when the "poFirstFNC1MatchAI01" is included in the value of Options property, if the "\f" followed by a SSC-14 number (including Application Identifier 01 and 13-digit data, the checkdigit isn't required) is placed at beginnig of barcode text, the "\905" will be selected to encode the FNC1 character in order to reduce the symbol size (the leading Application Identifier 01 is not encoded in the SSC-14 number).
\s[<Index>, <File_ID>, <File_Name>, <Amount>, <Time_Stamp>, <Sender>, <Address>, <File_Size>, <Checksum>]: Insert structured append control block to barcode text in order to create the structured append symbol. See also the "Structured append" section below.
\,: Insert a comma to File name, Sender or Address field in the structured append control block. It shall only be placed in these fields of structured append control. See also the "Structured append" section below.
\t: Structured append terminator. If the segment count is unused in the structured append control block of a structured append symbols set, this terminator is required in last symbol within the set of the structured append symbols. Otherwise, it's optional. See also the "Structured append" section below.
\<nnn>: Insert a function codeword. This "<nnn>" can be one of these values:
900: Manually places a mode latch to Text compaction mode.
901: Manually places a mode latch to Byte compaction mode. It shall be used when the total number of subsequent bytes to be encoded is not a multiple of 6, otherwise, it will be changed to "\924" automatically by the component.
902: Manually places a mode latch to Numeric compaction mode.
903: If it's placed at beginning of barcode text, it represents a leading FNC1 character in "First position" mode and indicates that the MicroPDF417 symbol's data output shall conform with the Code128 specification (UCC/EAN-128 emulation, the symbology identifier prefix is set to ]C1 or ]L3). Also it implies a mode latch to Mixed sub-mode of Text compaction mode.
If it's placed in the barcode text, but not at beginning of the barcode text, it represents an FNC1 character as field separator, and implies a mode latch to Alpha sub-mode of Text compaction mode.
904: If it's placed at beginning of barcode text, it represents a leading FNC1 character in "First position" mode and indicates that the MicroPDF417 symbol's data output shall conform with the Code128 specification (UCC/EAN-128 emulation, the symbology identifier prefix is set to ]C1 or ]L3). Also it implies a mode latch to Numeric compaction mode.
If it's placed in the barcode text, but not at beginning of the barcode text, it represents an FNC1 character as field separator, and implies a mode latch to Mixed sub-mode of Text compaction mode.
905: If the "\905" followed by 13 required digits is placed at beginning of barcode text, it represents a leading FNC1 character in "First position" mode and encodes a SCC-14 number together with subsequent 13 digits (the Application Identifier 01 is implied and the last checkdigit isn't required). It indicates that the MicroPDF417 symbol's data output shall conform with the Code128 specification (UCC/EAN-128 emulation, the symbology identifier prefix is set to ]C1 or ]L3). Also it implies a mode latch to Numeric compaction mode.
If the it is placed in the barcode text, but not at beginning of the barcode text, it represents an FNC1 character as field separator, and implies a mode latch to Numeric compaction mode.
906: It represents a leading FNC1 character in "First position" mode and implies a mode latch to Mixed sub-mode of Text compaction mode. It not only indicates that the MicroPDF417 symbol's data output shall conform with the Code128 specification (UCC/EAN-128 emulation, the symbology identifier prefix is set to ]C1 or ]L3), but also indicates that a linear symbol printed below the symbol is "linked" to the data of the symbol.
The escape sequence shall only be placed once at beginning of barcode text, otherwise an OnInvalidChar or OnInvalidDataChar (only for Delphi/C++ Builder 2009 or later) event will occur.
907: It represents a leading FNC1 character in "First position" mode and implies a mode latch to Numeric compaction mode. it not only indicates that the MicroPDF417 symbol's data output shall conform with the Code128 specification (UCC/EAN-128 emulation, the symbology identifier prefix is set to ]C1 or ]L3), but also indicates that a linear symbol printed below the symbol is "linked" to the data of the symbol.
The escape sequence shall only be placed once at beginning of barcode text, otherwise an OnInvalidChar or OnInvalidDataChar (only for Delphi/C++ Builder 2009 or later) event will occur.
908: The "\908" followed by an application indicator (single Latin alphabetic character from the set "a" to "z" and "A" to "Z", or a two-digit number) represents a leading FNC1 character in "Second position" mode, and indicates that the MicroPDF417 symbol's data output shall conform with the Code128 specification (used by AIM Global, the symbology identifier prefix is set to ]C2 or ]L4). Also it implies a mode latch to Mixed sub-mode of Text compaction mode.
The escape sequence shall only be placed once at beginning of barcode text, otherwise an OnInvalidChar or OnInvalidDataChar (only for Delphi/C++ Builder 2009 or later) event will occur.
909: The "\909" followed by an application indicator (single Latin alphabetic character from the set "a" to "z" and "A" to "Z", or a two-digit number) represents a leading FNC1 character in "Second position" mode, and indicates that the MicroPDF417 symbol's data output shall conform with the Code128 specification (used by AIM Global, the symbology identifier prefix is set to ]C2 or ]L4). Also it implies a mode latch to Numeric compaction mode.
The escape sequence shall only be placed once at beginning of barcode text, otherwise an OnInvalidChar or OnInvalidDataChar (only for Delphi/C++ Builder 2009 or later) event will occur.
910: It indicates that the MicroPDF417 symbol's data output shall conform with the Code128 specification (standard data package, the symbology identifier prefix is set to ]C0 or ]L5), and implies a mode latch to Mixed sub-mode of Text compaction mode.
The escape sequence shall only be placed once at beginning of barcode text, otherwise an OnInvalidChar or OnInvalidDataChar (only for Delphi/C++ Builder 2009 or later) event will occur.
911: It indicates that the MicroPDF417 symbol's data output shall conform with the Code128 specification (standard data package, the symbology identifier prefix is set to ]C0 or ]L5), and implies a mode latch to Numeric compaction mode.
The escape sequence shall only be placed once at beginning of barcode text, otherwise an OnInvalidChar or OnInvalidDataChar (only for Delphi/C++ Builder 2009 or later) event will occur.
912[AAYYMMDDBB]: It represents a leading FNC1 character in "First position" mode and implies a mode latch to Numeric compaction mode. Not only does it indicate that the MicroPDF417 symbol's data output shall conform with the Code128 specification (UCC/EAN-128 emulation, the symbology identifier prefix is set to ]C1 or ]L3), but also it encodes that the data begins with a 6-digit date field (Application Identifier is 11, 13, 15, or 17), and this date field may be followed by an implied Application Identifier 10 or 21 as well:
For example:
\912[1199010721]
Also, You can encode the 6-digit date field and the subsequent Application Identifier by yourself:
\912994071
You can explicitly insert a mode latch to Numeric compaction mode after the "\912" by using the "-":
\912[-1199010721]
\912[-]994071
The escape sequence shall only be placed once at beginning of barcode text, otherwise an OnInvalidChar or OnInvalidDataChar (only for Delphi/C++ Builder 2009 or later) event will occur.
914: It represents a leading FNC1 character in "First position" mode and implies a mode latch to Numeric compaction mode. It not only indicates that the MicroPDF417 symbol's data output shall conform with the Code128 specification (UCC/EAN-128 emulation, the symbology identifier prefix is set to ]C1 or ]L3), but also indicates that the data begins with an implied Application Identifier is 10.
The escape sequence shall only be placed once at beginning of barcode text, otherwise an OnInvalidChar or OnInvalidDataChar (only for Delphi/C++ Builder 2009 or later) event will occur.
915: It represents a leading FNC1 character in "First position" mode and implies a mode latch to Numeric compaction mode. it not only indicates that the MicroPDF417 symbol's data output shall conform with the Code128 specification (UCC/EAN-128 emulation, the symbology identifier prefix is set to ]C1 or ]L3), but also indicates that the data begins with an implied Application Identifier is 21.
The escape sequence shall only be placed once at beginning of barcode text, otherwise an OnInvalidChar or OnInvalidDataChar (only for Delphi/C++ Builder 2009 or later) event will occur.
916: Insert a 05 macro to barcode text. It shall only be placed once at beginning of the barcode text and it shall not be used in conjunction with a series of structured append symbols. It's completely equivalent to escape sequence "\5".
917: Insert a 06 macro to barcode text. It shall only be placed once at beginning of the barcode text and it shall not be used in conjunction with a series of structured append symbols. It's completely equivalent to escape sequence "\6".
918: It shall be used as a linkage flag to signal the presence of an associated linear component in a composite symbol (other than an ECC.UCC composite symbol). The "\918" may be placed anywhere in the barcode text.
919: Reserved.
920: It shall be used as a linkage flag to signal the presence of an associated linear component in an ECC.UCC composite symbol. The "\920" may be placed anywhere in the barcode text.
921: Instructs the reader to interpret the data contained within the MicroPDF417 symbol as programming for reader initialisation. It only shall be placed once at beginning of the barcode text. In the case of a structured append initialisation sequence, it shall appear in every symbol. It's completely equivalent to escape sequence "\r".
924: Manually places a mode latch to Byte compaction mode. It shall be used when the total number of subsequent bytes to be encoded is an integer multiple of 6, otherwise, it will be changed to "\901" automatically by the component.
For some reader, the meanings of some function codewords don't conform with the MicroPDF417 specification. You can use the Options property to change the meanings of these fucntion codewords, in order to match the reader.
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).
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 MicroPDF417:
The ECI is identified by an integer (up to 6 digits) which is encoded in the MicroPDF417 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 structured append set of MicroPDF417 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.
Structured append provides a mechanism for the data in a file too large to be split into blocks and be represented in more than one MicroPDF417 symbol. Up to 99999 individual MicroPDF417 symbols may be used to encode data in structured append.
Structured append symbols differ from ordinary MicroPDF417 symbols in that they contain additional control information in a structured append control block. The control block defines the file ID, the concatenation sequence and optionally other information about the file. structured append decoder uses the control block's information to reconstruct the file correctly independently of symbol scanning order. The escape sequence "\s[<Index>, <File_ID>, <File_Name>, <Amount>, <Time_Stamp>, <Sender>, <Address>, <File_Size>, <Checksum>]" is used to place the structured append control block to the barcode text:
Index: The position index of the symbol within the set set of MicroPDF417 symbols in the structured append format. It's an integer between 1 and 999999 (including the boundaries) in decimal string format. Note, the field is required.
File_ID: The file ID. It is a variable length numeric sequence which contains one or more triads of digits. Each triad of digits is an integer between 000 to 899 (the leading zero is required), in decimal string format. For each related structured append symbol, the file ID should be specified using the same numeric sequence. This ensures that all reassembled symbol data belongs to the same distributed file representation. Note, the field is required.
File_Name: The file name. It's a text string with an implied reset to ECI 000002. The ECI escape sequences may be used in order to set a different ECI within the field. Note, the field is optional.
Amount: The segment count (identifying the total number of structured append symbols in the distributed file). It's an integer between 2 and 99999 (including the boundaries) in decimal string format. Note, the field is optional, if it's used, that field shall appear in every segment.
Time_Stamp: The time stamp. It indicates the time stamp on the source file. It's a GMT time in "yyyy-mm-dd hh:nn:ss" format:
Note, entire time portion or the minute and second portion are optional, i.e. the "yyyy-mm-dd", "yyyy-mm-dd hh", and "yyyy-mm-dd hh:nn" formats are valid. If the hour, minute or second portion is not included, they defaults to 00.
Sender: The sender, It's a text string with an implied reset to ECI 000002. The ECI escape sequences may be used in order to set a different ECI within the field. Note, the field is optional.
Address: The address, It's a text string with an implied reset to ECI 000002. The ECI escape sequences may be used in order to set a different ECI within the field. Note, the field is optional.
File_Size: The file size. It's an integer in decimal string format, and indicates the size in bytes of the entire source file. Note, the field is optional.
Checksum: The checksum, It's an integer value of the 16-bit (2 bytes) CRC checksum using the CCITT-16 polynomial computed over the entire source file, in decimal string format. You can use the GetCheckSum method to calculate the checksum for a source file. Note, the field is optional.
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 escape sequence "\," 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 block 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 block be placed more than once or it isn't placed at end of the barcode text.
The following is an example of structured append symbol:
ABCDEFGHIJKLMN\s[2,001287023,,5,2008-12-03 05:30:00,,USA]
Note, if the segment count is unused, a structured append terminator, "\t" escape sequence is required in last symbol within the set of structured append symbols. Otherwise, it's optional. The "\t" escape sequence shall be placed at the end of the barcode text, after the structured append control block. For example:
ABCDEFGHIJKLMN\s[5,001287023]\t
The AllowEscape property should be set to true in order to place the structured append control block and the terminator.
(*): The Data property, OnInvalidDataLength and OnInvalidDataChar events are available only for the Delphi/C++ Builder 2009 or later.