How to encode a GS1 barcode symbol

Please use the TBarcode1D_Code128 or the TBarcode1D_EAN128 component:

  1. Set the AllowGS1 property to True in order to encode the GS1 barcode data directly.

  2. Use the GS1 barcode text directly as the value for the Barcode or Data property, and as the value for the Barcode or Data parameter in the DrawTo, DrawToSize, Print, and PrintSize methods.

Note, in GS1 barcode text, parentheses "()" should be used to enclose Application Identifiers (AIs), and '((' should be used to insert a '(' character; the FNC1 is inserted automatically, there is no need to insert it manually. for example: '(01)00625251888886(18)110201(10)456((D)CB(21)9876543210'.

For example:

...

Barcode1D_Code1281.AllowGS1 := True;

Barcode1D_Code1281.Barcode := '(01)00625251888886(18)110201(10)456((D)CB(21)9876543210';

...

or

Printer.BeginDoc;

... { Print other content }

Barcode1D_Code1281.AllowGS1 := True;

Barcode1D_Code1281.Print(20, 20, '(01)00625251888886(18)110201(10)456((D)CB(21)9876543210', True, clBlack, clWhite, TextDefine, 2, 0.3);

... { Print other content }

Printer.EndDoc;

Contents