[SerializableAttribute()]
[DataContractAttribute()]
public enum BarcodeSymbology
Value | Member | Description |
---|---|---|
0 | Unknown |
Unknown symbology type. This has a special meaning in some of the methods that use BarcodeSymbology. For example, you can pass Unknown as the symbology parameter for the BarcodeReader.ReadBarcode method to indicate that the barcode type is unknown. It will also instruct the engine to read the first barcode found in the image using the other parameters. |
1 | EAN13 |
EAN-13 (International Article Number with 13 digits) symbology. Used internationally with consumer products. |
2 | EAN8 |
EAN-8. Derived from the longer European Article Number (EAN-13) code. It was introduced for use on small packages where an EAN-13 barcode would be too large. |
3 | UPCA |
UPC-A (Universal Product Code). Used with consumer products in the United States. |
4 | UPCE |
UPC-E. The short version of UPC-A. |
5 | Code3Of9 |
Code 3 of 9 (Code 39) type. Used especially in non-retail environments. |
6 | Code128 |
Code 128 type. Very dense code, used extensively worldwide. |
7 | CodeInterleaved2Of5 |
Interleaved 2 of 5 type. Used in warehouse, industrial applications. |
8 | Codabar |
CODABAR (Ames Code/USD-4/NW-7/2 of 7 Code) type. Used in libraries and blood banks. |
9 | UCCEAN128 |
UCCEAND 128 type |
10 | Code93 |
Code 93 type. Compressed form of Code 39 |
11 | EANEXT5 |
5-digit supplemental type. May be used with UPCA, UPCE, EAN13 and EAN8 on books to indicate a suggested retail price. |
12 | EANEXT2 |
2-digit supplemental type. May be used with UPCA, UPCE, EAN13 and EAN8 to indicate magazines and newspaper issue numbers. |
13 | MSI |
MSI (Modified Plessey) type. Used to mark retail shelves for inventory control. |
14 | Code11 |
Code 11 (USD-8) type. Used in labeling telecommunications equipment. |
15 | CodeStandard2Of5 |
Standard 2 of 5 (Industrial 2 of 5) type. Used in the photofinishing, warehouse sorting industries and sequentially numbering airline tickets. |
16 | GS1Databar |
GS1 Databar (formerly RSS14) type. Used in grocery industry, healthcare, and where items are too small to allow for older barcode symbologies. |
17 | GS1DatabarLimited |
GS1 Databar (formerly RSS14) Limited type. It is a short version of GS1 Databar (formerly RSS14). |
18 | GS1DatabarExpanded |
GS1 Databar (formerly RSS14) Expanded type. It encodes item identification plus supplementary strings such as weight and date. Used in grocery industry and healthcare. |
19 | PatchCode |
Patch Code type. Used only for batch separation and scanner control, primarily with Kodak scanners. |
20 | PostNet |
POSTNET (Postal Numeric Encoding Technique). Used by the United States Postal Service to assist in directing mail. |
21 | Planet |
PLANET (Postal Alpha Numeric Encoding Technique). Used by the United States Postal Service to identify and track pieces of mail during delivery. |
22 | AustralianPost4State |
Australian Post 4-State type. |
23 | RoyalMail4State |
Royal Mail (RM4SCC) 4-State type. |
24 | USPS4State |
USPS OneCode 4-State Barcode (4BC) type. |
25 | GS1DatabarStacked |
GS1 Databar (formerly RSS14) Stacked / GS1 Databar Stacked Omni-Directional types. Used as GS1 Databar when the available space is too narrow for the standard GS1 Databar. |
26 | GS1DatabarExpandedStacked |
GS1 Databar (formerly RSS14) Expanded Stacked barcode type. Used as GS1 Databar Expanded when the available space is too narrow to fit in one line. |
27 | PDF417 |
PDF417 (Portable Data File). 2D symbol used in a variety of applications, primarily transport, identification cards, and inventory management. Note, the PDF417 barcode symbology does not have any relation to Adobe PDF (Portable Document Format). |
28 | MicroPDF417 |
MicroPDF417 (Portable Data File). Version of PDF417 that can hold up to 150 bytes of data. Note, the MicroPDF417 barcode symbology does not have any relation to Adobe PDF (Portable Document Format). |
29 | Datamatrix |
Datamatrix. 2D symbol code used for marking small items. |
30 | QR |
QR (short for Quick Response). 2D symbol used by dedicated QR barcode readers and camera phones. |
31 | Aztec |
Aztec. 2D symbol used for train tickets, airline tickets and government documents. This barcode is able to reduce the required space over other matrix barcode as it does not require a surrounding quiet zone. |
32 | Maxi |
MaxiCode. 2D symbol developed and used by the United Parcel Service to identify and track pieces of mail during delivery. |
33 | MicroQR |
Micro QR. 2D symbol used where symbol size is limited. There are four sizes; the largest is capable of encoding 35 characters. Some sizes support more than one error correction level. |
34 | PharmaCode |
PharmaCode type. Used in the pharmaceutical industry as a packing control system. |
To get a list of all the barcode symbologies supported by LEADTOOLS, use BarcodeEngine.GetSupportedSymbologies, to get a list of the read or write symbologies currently available (support has been unlocked and the backend runtime assembly exists), use BarcodeReader.GetAvailableSymbologies and BarcodeWriter.GetAvailableSymbologies.
For description and visual samples of the barcode symbologies supported by LEADTOOLS, refer to Supported Barcode Symbologies.
The BarcodeEngine.GetSymbologyFriendlyName method can be used to return a string that contains a friendly name for any BarcodeSymbology enumeration member.
using Leadtools;
using Leadtools.Codecs;
using Leadtools.Barcode;
using Leadtools.ImageProcessing;
public void BarcodeWriter_Example()
{
// Create a directory to store the images we will create
string outDir = Path.Combine(LEAD_VARS.ImagesDir, "MyBarcodes");
if (Directory.Exists(outDir))
{
Directory.Delete(outDir, true);
}
Directory.CreateDirectory(outDir);
int resolution = 300;
// Create a Barcode engine
BarcodeEngine engine = new BarcodeEngine();
// Get the Barcode writer
BarcodeWriter writer = engine.Writer;
// All 1D options have the UseXModule set to false by default, we need to set it to true
// so we can calculate the default size. We will change the default options so we can
// pass null to CalculateBarcodeDataBounds and WriteBarcode below
// For all Standard 1D
OneDBarcodeWriteOptions oneDWriteOptions = writer.GetDefaultOptions(BarcodeSymbology.UPCA) as OneDBarcodeWriteOptions;
oneDWriteOptions.UseXModule = true;
// All GS1 Databar Stacked
GS1DatabarStackedBarcodeWriteOptions gs1DatabarStackedWriteOptions = writer.GetDefaultOptions(BarcodeSymbology.GS1DatabarStacked) as GS1DatabarStackedBarcodeWriteOptions;
gs1DatabarStackedWriteOptions.UseXModule = true;
// Patch Code
PatchCodeBarcodeWriteOptions patchCodeWriteOptions = writer.GetDefaultOptions(BarcodeSymbology.PatchCode) as PatchCodeBarcodeWriteOptions;
patchCodeWriteOptions.UseXModule = true;
// All PostNet/Planet
PostNetPlanetBarcodeWriteOptions postNetPlanetWriteOptions = writer.GetDefaultOptions(BarcodeSymbology.PostNet) as PostNetPlanetBarcodeWriteOptions;
postNetPlanetWriteOptions.UseXModule = true;
// We will use this object to save files
using (RasterCodecs codecs = new RasterCodecs())
{
// Get all the available write symbologies
BarcodeSymbology[] symbologies = writer.GetAvailableSymbologies();
foreach (BarcodeSymbology symbology in symbologies)
{
Console.WriteLine("Processing {0}", symbology);
// Create the default data for this symbology
BarcodeData data = BarcodeData.CreateDefaultBarcodeData(symbology);
// Calculate its size with default options
writer.CalculateBarcodeDataBounds(LeadRect.Empty, resolution, resolution, data, null);
// Create an image to write the data to
LeadRect pixels = data.Bounds;
using (RasterImage image = RasterImage.Create(pixels.Width, pixels.Height, 1, resolution, RasterColor.FromKnownColor(RasterKnownColor.White)))
{
// Write the barcode with default options
writer.WriteBarcode(image, data, null);
// Save it
string outFileName = Path.Combine(outDir, symbology + ".tif");
codecs.Save(image, outFileName, RasterImageFormat.Tif, 1);
}
}
}
}
static class LEAD_VARS
{
public const string ImagesDir = @"C:\LEADTOOLS22\Resources\Images";
}
Programming with LEADTOOLS Barcode
UPC / EAN Barcodes in LEADTOOLS
GS1 DataBar / RSS-14 Barcodes in LEADTOOLS
Code 128 Barcodes in LEADTOOLS
USPS and 4-State Barcodes in LEADTOOLS
MSI Barcodes (Pulse Width Modulated) in LEADTOOLS
Miscellaneous Barcodes in LEADTOOLS
Datamatrix Barcodes in LEADTOOLS
PDF417 and MicroPDF417 Barcodes in LEADTOOLS