[SerializableAttribute()]
public enum BarcodeExceptionCode
<SerializableAttribute()>
Public Enum BarcodeExceptionCode
typedef NS_ENUM(NSInteger, LTBarcodeError)
public enum BarcodeExceptionCode
[SerializableAttribute()]
public enum class BarcodeExceptionCode
Value | Member | Description |
---|---|---|
-1481 | InvalidXModule |
Barcode Module size should be greater or equal to 0. |
-1382 | DllNotFound |
Barcode Engine assembly not found. |
-1381 | QrWriteLocked |
Barcode Write QR is locked. |
-1380 | QrReadLocked |
Barcode Read QR is locked. |
-1375 | MicroQrWriteLocked |
Barcode Write Micro QR is locked |
-1374 | MicroQrReadLocked |
Barcode Read Micro QR is locked |
-1373 | MaxiWriteLocked |
Barcode Write Maxi is locked |
-1372 | MaxiReadLocked |
Barcode Read Maxi is locked |
-1371 | AztecWriteLocked |
Barcode Write Aztec is locked |
-1370 | AztecReadLocked |
Barcode Read Aztec is locked. |
-433 | DatamatrixWriteLocked |
Barcode Write Datamatrix is locked. |
-432 | DatamatrixReadLocked |
Barcode Read Datamatrix is locked. |
-430 | PdfWriteLocked |
Barcode Write PDF is locked. |
-429 | PdfReadLocked |
Barcode Read PDF is locked. |
-428 | Barcode2dWriteLocked |
Barcode Write 2D is locked. |
-427 | Barcode2dReadLocked |
Barcode Read 2D is locked. |
-426 | Barcode1dLocked |
Barcode 1D is locked. |
-425 | InvalidBounds |
Invalid barcode bounds. |
-424 | InvalidStringLength |
Invalid barcode data string length. |
-420 | InvalidGroup |
Invalid barcode group. |
-419 | InvalidMaximumCount |
Invalid maximum count. |
-418 | InvalidUnits |
Invalid barcode measurement unit. |
-416 | InvalidBarcodeString |
Invalid barcode string for a specified barcode symbology. |
-415 | ToSmall |
Barcode string is too small. |
-414 | InvalidHeight |
Invalid barcode height. |
-413 | InvalidWidth |
Invalid barcode width. |
-412 | InvalidTextOut |
Invalid barcode text out option. |
-411 | InvalidType |
Invalid barcode symbology. |
Used as the type of the BarcodeException.Code property which can be used to get extra details about the LEADTOOLS barcode exception being thrown.
using Leadtools;
using Leadtools.Codecs;
using Leadtools.Barcode;
using Leadtools.ImageProcessing;
public void BarcodeExceptionCode_Example()
{
// Example of values passed by the user for the barcode width and height
int barcodeWidth = 30;
int barcodeHeight = 60;
// These values are too small to write a UPCA barcode and will throw an exception below
// Create a Barcode engine
BarcodeEngine engine = new BarcodeEngine();
// Get the Barcode writer
BarcodeWriter writer = engine.Writer;
// Create an image
using (RasterImage image = RasterImage.Create(1000, 1000, 1, 300, RasterColor.FromKnownColor(RasterKnownColor.White)))
{
// Create the barcode
BarcodeData barcode = BarcodeData.CreateDefaultBarcodeData(BarcodeSymbology.UPCA);
barcode.Bounds = new LeadRect(0, 0, barcodeWidth, barcodeHeight);
// Try to write it, this will throw an exception if the barcode is too small
try
{
writer.WriteBarcode(image, barcode, null);
}
catch (BarcodeException ex)
{
// Show the error message, should be BarcodeExceptionCode.InvalidWidth
Console.WriteLine(ex.Code);
Debug.Assert(ex.Code == BarcodeExceptionCode.InvalidWidth);
}
}
}
Imports Leadtools
Imports Leadtools.Codecs
Imports Leadtools.Barcode
Imports Leadtools.ImageProcessing
Public Sub BarcodeExceptionCode_Example()
' Example of values passed by the user for the barcode width and height
Dim barcodeWidth As Integer = 30
Dim barcodeHeight As Integer = 60
' These values are too small to write a UPCA barcode and will throw an exception below
' Create a Barcode engine
Dim engine As New BarcodeEngine()
' Get the Barcode writer
Dim writer As BarcodeWriter = engine.Writer
' Create an image
Using image As RasterImage = RasterImage.Create(1000, 1000, 1, 300, RasterColor.FromKnownColor(RasterKnownColor.White))
' Create the barcode
Dim barcode As BarcodeData = BarcodeData.CreateDefaultBarcodeData(BarcodeSymbology.UPCA)
barcode.Bounds = New LeadRect(0, 0, barcodeWidth, barcodeHeight)
' Try to write it, this will throw an exception if the barcode is too smalle
Try
writer.WriteBarcode(image, barcode, Nothing)
Catch ex As BarcodeException
' Show the error message, should be BarcodeExceptionCode.InvalidWidth
Console.WriteLine(ex.Code)
Debug.Assert(ex.Code = BarcodeExceptionCode.InvalidWidth)
End Try
End Using
End Sub
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document
Your email has been sent to support! Someone should be in touch! If your matter is urgent please come back into chat.
Chat Hours:
Monday - Friday, 8:30am to 6pm ET
Thank you for your feedback!
Please fill out the form again to start a new chat.
All agents are currently offline.
Chat Hours:
Monday - Friday
8:30AM - 6PM EST
To contact us please fill out this form and we will contact you via email.