←Select platform

GetAvailableSymbologies Method

Summary
Gets a list of all the barcode symbologies (types) currently available for reading by LEADTOOLS.
Syntax
C#
Objective-C
C++/CLI
Java
Python
public BarcodeSymbology[] GetAvailableSymbologies() 
@property (nonatomic, strong, readonly) NSArray<NSNumber *> *availableSymbologies; 
public BarcodeSymbology[] getAvailableSymbologies() 
public: 
array<BarcodeSymbology>^ GetAvailableSymbologies();  
def GetAvailableSymbologies(self): 

Return Value

An array of BarcodeSymbology enumeration members that list all the barcode symbologies (types) currently available for reading by LEADTOOLS.

Remarks

The GetSupportedSymbologies returns all the barcode symbologies (types) supported by LEADTOOLS. Depending on the level of unlocked support and availability of the back-end barcode assemblies, not all of the supported types may be available. For example, if the Leadtools.Barcode.QrRead.dll assembly is missing, QR read support will not be available to your application.

To get a list of the barcode symbologies available for reading, use BarcodeReader.GetAvailableSymbologies and to get a list of the barcode symbologies available for writing, use BarcodeWriter.GetAvailableSymbologies.

To get the friendly name of any barcode symbology, use BarcodeEngine.GetSymbologyFriendlyName.

Example
C#
Java
using Leadtools; 
using Leadtools.Codecs; 
using Leadtools.Barcode; 
using Leadtools.ImageProcessing; 
 
 
public void BarcodeEngine_SupportedAndAvailableSymbologiesExample() 
{ 
   // Show all the supported symbologies 
   BarcodeSymbology[] supportedSymbologies = BarcodeEngine.GetSupportedSymbologies(); 
   Console.WriteLine("{0} Supported symbologies:", supportedSymbologies.Length); 
   foreach (BarcodeSymbology symbology in supportedSymbologies) 
   { 
      Console.WriteLine("{0}: {1}", symbology, BarcodeEngine.GetSymbologyFriendlyName(symbology)); 
   } 
   Console.WriteLine("----------"); 
 
   // Create a Barcode engine to get the available read and write symbologies 
   BarcodeEngine engine = new BarcodeEngine(); 
 
   BarcodeSymbology[] readSymbologies = engine.Reader.GetAvailableSymbologies(); 
   Console.WriteLine("{0} Avaliable read symbologies:", readSymbologies.Length); 
   foreach (BarcodeSymbology symbology in readSymbologies) 
   { 
      Console.WriteLine(symbology); 
   } 
   Console.WriteLine("----------"); 
 
   BarcodeSymbology[] writeSymbologies = engine.Writer.GetAvailableSymbologies(); 
   Console.WriteLine("{0} Avaliable write symbologies:", writeSymbologies.Length); 
   foreach (BarcodeSymbology symbology in writeSymbologies) 
   { 
      Console.WriteLine(symbology); 
   } 
} 
 
import static org.junit.Assert.assertTrue; 
 
import java.io.File; 
import java.io.IOException; 
import org.junit.*; 
import org.junit.runner.JUnitCore; 
import org.junit.runner.Result; 
import org.junit.runner.notification.Failure; 
import leadtools.*; 
import leadtools.barcode.*; 
import leadtools.codecs.*; 
 
 
public void barcodeEngine_SupportedAndAvailableSymbologiesExample() { 
   // Show all the supported symbologies 
   BarcodeSymbology[] supportedSymbologies = BarcodeEngine.getSupportedSymbologies(); 
   System.out.printf("%1s Supported symbologies:%n", supportedSymbologies.length); 
   for (BarcodeSymbology symbology : supportedSymbologies)  
      System.out.printf("%1s: %2s%n", symbology, BarcodeEngine.getSymbologyFriendlyName(symbology)); 
   System.out.println("----------"); 
 
   // Create a Barcode engine to get the available read and write symbologies 
   BarcodeEngine engine = new BarcodeEngine(); 
 
   BarcodeSymbology[] readSymbologies = engine.getReader().getAvailableSymbologies(); 
   System.out.printf("%1s Avaliable read symbologies:%n", readSymbologies.length); 
   for (BarcodeSymbology symbology : readSymbologies)  
      System.out.println(symbology); 
   System.out.println("----------"); 
 
   BarcodeSymbology[] writeSymbologies = engine.getWriter().getAvailableSymbologies(); 
   System.out.printf("%1s Avaliable write symbologies:%n", writeSymbologies.length); 
   int i = 0; 
   for (BarcodeSymbology symbology : writeSymbologies) { 
      System.out.println(symbology); 
      i++; 
   } 
   assertTrue("not all symbologies are present", i == writeSymbologies.length); 
   System.out.println("All write symbologies printed"); 
} 
Requirements

Target Platforms

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

Leadtools.Barcode Assembly

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