BarcodeSymbology Enumeration

Summary

The barcode symbologies supported by LEADTOOLS

Syntax
TypeScript
JavaScript
lt.Barcode.BarcodeSymbology = { 
   unknown: 0, 
   ean13: 1, 
   ean8: 2, 
   upca: 3, 
   upce: 4, 
   code3Of9: 5, 
   code128: 6, 
   codeInterleaved2Of5: 7, 
   codabar: 8, 
   uccean128: 9, 
   code93: 10, 
   eanext5: 11, 
   eanext2: 12, 
   msi: 13, 
   code11: 14, 
   codeStandard2Of5: 15, 
   gs1Databar: 16, 
   gs1DatabarLimited: 17, 
   gs1DatabarExpanded: 18, 
   patchCode: 19, 
   postNet: 20, 
   planet: 21, 
   australianPost4State: 22, 
   royalMail4State: 23, 
   usps4State: 24, 
   gs1DatabarStacked: 25, 
   gs1DatabarExpandedStacked: 26, 
   pdf417: 27, 
   microPDF417: 28, 
   datamatrix: 29, 
   qr: 30, 
   aztec: 31, 
   maxi: 32, 
   microQR: 33, 
   pharmaCode: 34 
} 
lt.Barcode.BarcodeSymbology = { 
   unknown: 0, 
   ean13: 1, 
   ean8: 2, 
   upca: 3, 
   upce: 4, 
   code3Of9: 5, 
   code128: 6, 
   codeInterleaved2Of5: 7, 
   codabar: 8, 
   uccean128: 9, 
   code93: 10, 
   eanext5: 11, 
   eanext2: 12, 
   msi: 13, 
   code11: 14, 
   codeStandard2Of5: 15, 
   gs1Databar: 16, 
   gs1DatabarLimited: 17, 
   gs1DatabarExpanded: 18, 
   patchCode: 19, 
   postNet: 20, 
   planet: 21, 
   australianPost4State: 22, 
   royalMail4State: 23, 
   usps4State: 24, 
   gs1DatabarStacked: 25, 
   gs1DatabarExpandedStacked: 26, 
   pdf417: 27, 
   microPDF417: 28, 
   datamatrix: 29, 
   qr: 30, 
   aztec: 31, 
   maxi: 32, 
   microQR: 33, 
   pharmaCode: 34 
} 
Members
ValueMemberDescription
0UnknownUnknown 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 DocumentPage.ReadBarcodes 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.
1EAN13(International Article Number with 13 digits) symbology. Used internationally with consumer products.
2EAN8Derived 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.
3UPCA(Universal Product Code). Used with consumer products in the United States.
4UPCEThe short version of UPC-A.
5Code3Of9(Code 39) type. Used especially in non-retail environments.
6Code128Code 128 type. Very dense code, used extensively worldwide.
7CodeInterleaved2Of5Interleaved 2 of 5 type. Used in warehouse, industrial applications.
8Codabar(Ames Code/USD-4/NW-7/2 of 7 Code) type. Used in libraries and blood banks.
9UCCEAN128UCCEAND 128 type
10Code93Code 93 type. Compressed form of Code 39
11EANEXT55-digit supplemental type. May be used with UPCA, UPCE, EAN13 and EAN8 on books to indicate a suggested retail price.
12EANEXT22-digit supplemental type. May be used with UPCA, UPCE, EAN13 and EAN8 to indicate magazines and newspaper issue numbers.
13MSIMSI (Modified Plessey) type. Used to mark retail shelves for inventory control.
14Code11Code 11 (USD-8) type. Used in labeling telecommunications equipment.
15CodeStandard2Of5Standard 2 of 5 (Industrial 2 of 5) type. Used in the photofinishing, warehouse sorting industries and sequentially numbering airline tickets.
16GS1DatabarGS1 Databar (formerly RSS14) type. Used in grocery industry, healthcare, and where items are too small to allow for older barcode symbologies.
17GS1DatabarLimitedGS1 Databar (formerly RSS14) Limited type. It is a short version of GS1 Databar (formerly RSS14).
18GS1DatabarExpandedGS1 Databar (formerly RSS14) Expanded type. It encodes item identification plus supplementary strings such as weight and date. Used in grocery industry and healthcare.
19PatchCodePatch Code type. Used only for batch separation and scanner control, primarily with Kodak scanners.
20PostNet(Postal Numeric Encoding Technique). Used by the United States Postal Service to assist in directing mail.
21Planet(Postal Alpha Numeric Encoding Technique). Used by the United States Postal Service to identify and track pieces of mail during delivery.
22AustralianPost4StateAustralian Post 4-State type.
23RoyalMail4StateRoyal Mail (RM4SCC) 4-State type.
24USPS4StateUSPS OneCode 4-State Barcode (4BC) type.
25GS1DatabarStackedGS1 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.
26GS1DatabarExpandedStackedGS1 Databar (formerly RSS14) Expanded Stacked barcode type. Used as GS1 Databar Expanded when the available space is too narrow to fit in one line.
27PDF417(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).
28MicroPDF417(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).
29DatamatrixDatamatrix. 2D symbol code used for marking small items.
30QR(short for Quick Response). 2D symbol used by dedicated QR barcode readers and camera phones.
31AztecAztec. 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.
32MaxiMaxiCode. 2D symbol developed and used by the United Parcel Service to idand track pieces of mail during delivery.
33MicroQRMicro 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.
34PharmaCodePharmaCode type. Used in the pharmaceutical industry as a packing control system.
Example
Barcode.ts
DocumentHelper.ts
Barcode.js
DocumentHelper.js
Barcode.html
import { DocumentHelper } from "../../utilities/DocumentHelper"; 
 
export class LEADDocument_BarcodesExample { 
   public constructor() { 
      lt.RasterSupport.setLicenseUri("https://demo.leadtools.com/licenses/js/LEADTOOLSEVAL.txt", "EVAL", null); 
      DocumentHelper.initFactory(); 
   } 
 
   public run = (buttonID: string) => { 
      const exampleButton = document.getElementById(buttonID); 
      exampleButton.onclick = this.readBarcodes; 
   } 
 
   readBarcodes = () => { 
      const url = "https://demo.leadtools.com/images/tiff/barcodes.tif"; 
      const loadDocumentOptions = new lt.Document.LoadDocumentOptions(); 
 
      DocumentHelper.log("Loading document..."); 
      lt.Document.DocumentFactory.loadFromUri(url, loadDocumentOptions) 
         .done((document: lt.Document.LEADDocument) => { 
            DocumentHelper.log("Done. Reading barcodes..."); 
            // Read all the barcodes in the first page 
            const docPage = document.pages.item(0); 
            docPage.readBarcodes(lt.LeadRectD.empty, 0, null) 
               .done((barcodes) => { 
                  DocumentHelper.log("Number of barcodes read: " + barcodes.length + " (data in console)", barcodes); 
               }) 
               .fail(DocumentHelper.showServiceError); 
         }) 
         .fail(DocumentHelper.showServiceError); 
   } 
} 
export class DocumentHelper { 
   static showServiceError = (jqXHR, statusText, errorThrown) => { 
      alert("Error returned from service. See the console for details."); 
      const serviceError = lt.Document.ServiceError.parseError(jqXHR, statusText, errorThrown); 
      console.error(serviceError); 
   } 
 
   static log = (message: string, data?: any) => { 
      const outputElement = document.getElementById("output"); 
      if (outputElement) { 
         const time = (new Date()).toLocaleTimeString(); 
         const textElement = document.createElement("p"); 
         textElement.innerHTML = (outputElement.childElementCount + 1) + " [" + time + "]: " + message; 
         outputElement.insertBefore(textElement, outputElement.firstChild); 
      } 
 
      if (!data) 
         console.log(message); 
      else 
         console.log(message, data); 
   } 
 
   static initFactory = () => { 
      // To communicate with the DocumentsService, it must be running! 
      // Change these parameters to match the path to the service. 
      lt.Document.DocumentFactory.serviceHost = "http://localhost:40000"; 
      lt.Document.DocumentFactory.servicePath = ""; 
      lt.Document.DocumentFactory.serviceApiPath = "api"; 
   } 
} 
import { DocumentHelper } from "../../utilities/DocumentHelper"; 
 
export class LEADDocument_BarcodesExample { 
   constructor() { 
      lt.RasterSupport.setLicenseUri("https://demo.leadtools.com/licenses/js/LEADTOOLSEVAL.txt", "EVAL", null); 
      DocumentHelper.initFactory(); 
   } 
 
   run = (buttonID) => { 
      const exampleButton = document.getElementById(buttonID); 
      exampleButton.onclick = this.readBarcodes; 
   } 
 
   readBarcodes = () => { 
      const url = "https://demo.leadtools.com/images/tiff/barcodes.tif"; 
      const loadDocumentOptions = new lt.Document.LoadDocumentOptions(); 
 
      DocumentHelper.log("Loading document..."); 
      lt.Document.DocumentFactory.loadFromUri(url, loadDocumentOptions) 
         .done((document) => { 
            DocumentHelper.log("Done. Reading barcodes..."); 
            // Read all the barcodes in the first page 
            const docPage = document.pages.item(0); 
            docPage.readBarcodes(lt.LeadRectD.empty, 0, null) 
               .done((barcodes) => { 
                  DocumentHelper.log("Number of barcodes read: " + barcodes.length + " (data in console)", barcodes); 
               }) 
               .fail(DocumentHelper.showServiceError); 
         }) 
         .fail(DocumentHelper.showServiceError); 
   } 
} 
export class DocumentHelper { 
   static showServiceError = (jqXHR, statusText, errorThrown) => { 
      alert("Error returned from service. See the console for details."); 
      const serviceError = lt.Document.ServiceError.parseError(jqXHR, statusText, errorThrown); 
      console.error(serviceError); 
   } 
 
   static log = (message, data) => { 
      const outputElement = document.getElementById("output"); 
      if (outputElement) { 
         const time = (new Date()).toLocaleTimeString(); 
         const textElement = document.createElement("p"); 
         textElement.innerHTML = (outputElement.childElementCount + 1) + " [" + time + "]: " + message; 
         outputElement.insertBefore(textElement, outputElement.firstChild); 
      } 
 
      if (!data) 
         console.log(message); 
      else 
         console.log(message, data); 
   } 
 
   static initFactory = () => { 
      // To communicate with the DocumentsService, it must be running! 
      // Change these parameters to match the path to the service. 
      lt.Document.DocumentFactory.serviceHost = "http://localhost:40000"; 
      lt.Document.DocumentFactory.servicePath = ""; 
      lt.Document.DocumentFactory.serviceApiPath = "api"; 
   } 
} 
<!doctype html> 
<html lang="en"> 
<title>Document Example | Barcodes</title> 
 
<head> 
   <script src="https://code.jquery.com/jquery-2.2.4.min.js" 
      integrity="sha256-BbhdlvQf/xTY9gja0Dq3HiwQF8LaCRTXxZKRutelT44=" crossorigin="anonymous"></script> 
 
   <script src="../../LT/Leadtools.js"></script> 
   <script src="../../LT/Leadtools.Controls.js"></script> 
   <script src="../../LT/Leadtools.Annotations.Engine.js"></script> 
   <script src="../../LT/Leadtools.Annotations.Designers.js"></script> 
   <script src="../../LT/Leadtools.Annotations.Rendering.Javascript.js"></script> 
   <script src="../../LT/Leadtools.Annotations.Automation.js"></script> 
   <script src="../../LT/Leadtools.ImageProcessing.Main.js"></script> 
   <script src="../../LT/Leadtools.ImageProcessing.Color.js"></script> 
   <script src="../../LT/Leadtools.ImageProcessing.Core.js"></script> 
   <script src="../../LT/Leadtools.ImageProcessing.Effects.js"></script> 
   <script src="../../LT/Leadtools.Document.js"></script> 
   <script src="../../LT/Leadtools.Document.Viewer.js"></script> 
   <link rel="stylesheet" type="text/css" href="../../css/examples.css"> 
 
   <!-- All demo files are bundled and appended to the window --> 
   <script src="../../bundle.js" type="text/javascript"></script> 
</head> 
 
<body> 
   <div> 
      <button type="button" id="exampleButton">Run Example</button> 
   </div> 
   <div id="output"></div> 
   <div> 
      <img id="img" /> 
   </div> 
</body> 
 
<script> 
   window.onload = () => { 
      const example = new window.examples.LEADDocument.Barcodes(); 
      example.run("exampleButton"); 
   }; 
</script> 
</html> 
Requirements

Target Platforms

See Also

Reference

Leadtools.Barcode Namespace

Help Version 22.0.2023.2.1
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Document Assembly
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.