Introduction
This component can
be used in delphi applications for creating RSS / GS1 Databar and EAN-UCC composite barcodes. The supported symbologies are:
The Delphi classes
This section explains
how to use the classes in your application..
In order to create
a barcode you must create an instance of one of the following classes:
- TRSSBarcode1D:
use this class to create EAN8, EAN13, EAN128, UPCE or UPCA symbols.
Use the barType property to select the symbology to use.
- TJ4LRSS:
use this class to create RSS14, RSS stacked, RSS truncated or RSS stacked
omni-directional symbols. Use the Format method to select
the symbology to use.
- TJ4LRSSLimited:
use this class to create RSS Limited symbols.
- TJ4LRSSExpanded
: use this class to create RSS Expanded or Expanded Stacked symbols.
Use the Format method to select the stacked or non-stacked
format.
The following example
creates a EAN128 barcode and exports it to a bmp file.
var
bmp:TBitmap;
bc:TRSSBarcode1D;
begin
bc := TRSSBarcode1D.create(nil);
bc.barType:=J4LSYMBOL_EAN128;
bc.Code:='0103212345678906';
bc.HumanReadableCode:='(01)03212345678906';
bmp:=TBitmap.create();
bmp.height:=200;
bmp.width:=600;
bc.paintBarcode(bmp.Canvas);
bmp.SaveToFile('barcode.bmp');
Possible values for
the barType property are:
- J4LSYMBOL_EAN13
- J4LSYMBOL_UPCA
- J4LSYMBOL_EAN8
- J4LSYMBOL_UPCE
- J4LSYMBOL_EAN128
- J4LSYMBOL_RSS14. This value is
automatically set when you create an instance of TJ4LRSS.
- J4LSYMBOL_RSSLIMITED. This value is
automatically set when you create an instance of TJ4LRSSLimited.
- J4LSYMBOL_RSSEXPANDED. This value is
automatically set when you create an instance of TJ4LRSSExpanded.
If you want to create
a composite symbol you must set the value for the 2D component using
the secondaryCode property. For example:
rss:=TJ4LRSS.create(nil);
rss.Format:=FORMAT_STACKED;
rss.Code:='0341234567890';
// Note: do not pass
the 01 application identifier to RSS or RSSLimited classes.
rss.SecondaryCode:='17010200'; // this forces the 2D component to be
created.
Possible values for the Format properties are listed below,
please note the valid list of combinations:
- FORMAT_REGULAR
- FORMAT_TRUNCATED
- FORMAT_STACKED
- FORMAT_STACKED_OMNIDIRECTIONAL
- FORMAT_LIMITED. This value is
automatically set when you create an instance of TJ4LRSSLimited.
- FORMAT_EXPANDED. This value is
automatically set when you create an instance of TJ4LRSSExpanded.
- FORMAT_EXPANDED_STACKED. This value is
can be used in TJ4LRSSExpanded only.
Note that you should not pass the 01 application identifier nor the checksum
character in the code property of the RSS or RSSLimited classes.
You must however include all application identifiers for EAN128 and RSS
Expanded symbols.
All linear symbols (except EAN128) can be associated with a CC-A or CC-B
2D component. The software will automatically select the correct component
depending on the amount of data you need to encode.
EAN128 can be painted
with a CC-A/B component or a CC-C component. In this case you must select
the desired symbology using the EAN128WithCCC property. If you
select CC-C you must also set the number of columns using the ccCColumns
property (the default value is 4):
r :=
TRSSBarcode1D.create(nil);
r.barType:=J4LSYMBOL_EAN128;
r.Code:='0193812345678901';
r.humanReadableCode:='(01)93812345678901';
// create a composite barcode
r.EAN128WithCCC:=true;
r.secondaryCode:='10ABCD123456#4103898765432108';
|