Method: GetCheckSum - Syntax 1

(TBarcodeFmx2D_MicroPDF417)

Returns the check sum of a barcode text that will be encoded into a series of structured append symbols.

Syntax:

type

{ Defined in the pfmxPDF417Com unit }

TPDF417_Option = (poIgnoreShiftBeforeECI, poFirst903TextAlphaLatch, poFirst904TextMixedLatch, po906TextAlphaLatch, po907TextAlphaLatch, po908TextAlphaLatch, po910TextAlphaLatch, po912TextAlphaLatch, po914TextAlphaLatch, po915TextAlphaLatch, poFirstFNC1MatchAI01, poMicroPDF417Explicit901);

{ Defined in the pfmxPDF417Com unit }

TPDF417_Options = set of TPDF417_Option;

{ Defined in the pfmxMicroPDF417 unit }

TMicroPDF417_Options = TPDF417_Options;

function GetCheckSum(Barcode: string; AllowEscape: Boolean; var InvalidIndex: Integer; Options: TMicroPDF417_Options = []): string; virtual;

Description:

The method returns the check sum of a barcode text that will be encoded into a series of MicroPDF417 structured append symbols. The value will be used in the structured append block, and the structured append block will be used by each symbol in the series of MicroPDF417 structured append symbols. See also the "Structured append" section in the "TBarcodeFmx2D_MicroPDF417" article.

Parameters:
Return:

If the method succeeds, it returns the check sum value, it's a 16-bit word value, in decimal string (UnicodeString) format, and the InvalidIndex parameter returns Verify_OK (-1). If the method fails, the InvalidIndex parameter returns a position index of first invalid character in the Barcode parameter. See also the InvalidIndex parameter section above.

The result string can be directly used as the check sum in the structured append block. For example:

var

full_barcode, check_sum, structuredappend_block: string;

invalid_index: Integer;

begin

full_barcode := '......';

check_sum := GetCheckSum(full_barcode, False, invalid_index, []);

if invalid_index <> -1 then exit;

structuredappend_block := '\s[1,001287023,,5,2008-12-03 05:30:00,,USA,,' + check_sum + ']';

//.....

See also the "Sturctured append" section in the "TBarcodeFmx2D_MicroPDF417" article.

Contents