Because debugging and writing debug information to a log file is time consuming and expensive, Barcode Xpress provides the ability to control the level of information written to the debug log as well as the ability to turn off writing to a file completely.
Use the objects below to adjust the settings of your debugging, event handling, memory, and IDispose for optimal performance.
Control Debugging Information
- Debug - Turns on or off the ability to write to the debug log file.
- DebugLogFile - A filename which stores the debug log information.
- ErrorLevel - Controls the amount of information that is written to the debug log file.
When ErrorLevel is set to Detailed, BarcodeXpress will log most of your calls to the component including the occurrence of exceptions, the result of most major operations and the operation of each event it raises.
Troubleshooting
-
Color or Grayscale Images - Barcode Xpress works with 1, 8, or 24-bit images. To convert other formats, use the ColorDepth or other methods with the included ImagXpress component.
-
Not able to read Barcodes when you know they exist due to poor image quality - There is no set process for cleanup of images. What may work on one image for clean-up, may not work on another. The ScanFix component, which is sold separately, can perform many different cleanup operations such as SmoothandZoom, Dilation, and Erosion which all assist in recognition of the barcodes, but there is no set order in which to perform these operations that will ensure each image barcode will be detected. All ScanFix Xpress (sold separately) cleanup operations are very fast, so an option to consider is performing multiple operations and then retrying recognition. Some image cleanup operations can also be found in ImagXpress.
- Issues with barcode recognition - Some reasons why your barcode may not be detected could be due to poor resolution, resolutions of horizontal and vertical are not the same, the barcode wasn't made correctly according to the standard, bad scanning quality, bad image quality (see bullet two above), or the barcode is a type that Barcode Xpress doesn't read. Attempt to solve any image quality, resolution, and scanning properties using the included ImagXpress component.
-
Confidence values - Confidence values are programmed into the component. Barcode Xpress is conservative on confidence values compared to other competitive components so the developer understands when a barcode may not be 100% accurate. This ensures the barcode recognized is producing accurate data.
Event Handling
Barcode Xpress may throw a number of exceptions if it comes across errors or events that need to be handled by the application. These exceptions are tabulated below:
Exception | Description |
ColumnCountException | Thrown if the input columns are outside the valid range for a 2D barcode type to be created. |
ErrorCorrectionLevelTooHighException | Thrown if the input barcode data will fit in the 2D barcode but the error correction words will not fit because there are more error words than will fit in the remainder of the symbol. |
ImageNotAvailableException | Thrown whenever there is no image available for an operation that requires one. |
InsufficientHeightException | Thrown if the Height value set by the user is smaller than the required height of the barcode. |
InsufficientWidthException | Thrown if the barcode Width value set by the user is smaller than the required width of the barcode. |
InternalErrorException | Thrown whenever an unhandled exception is encountered. |
InvalidAreaException | Thrown whenever an invalid area is used in barcode recognition. |
InvalidBarcodeValueException | Thrown if the BarcodeValue is NULL, or if the barcode value set is invalid for the current barcode type. |
InvalidBitmapException | Thrown if an invalid bitmap is detected. |
InvalidErrorCorrectionLevelException | Thrown if the error correction level is not in the valid range for the 2D barcode type. |
InvalidIndexException | Thrown if a request for results is outside the valid range. |
InvalidLicenseException | Thrown if an invalid license is detected. |
InvalidParameterException | Thrown if a parameter is invalid. |
LargeDataSizeException | Thrown if the barcode data will not fit in the current symbols rows and columns. |
OutOfMemoryException | Thrown if the creation of the bitmap to draw the barcode fails. |
ParameterOutOfRangeException | Thrown if a parameter is out of range. |
PDF417EncodingException | Thrown if an internal exception has occurred while trying to encode the barcode data. |
RowCountException | Thrown if the input columns are outside the valid range of the 2D barcode type to be created. |
StringParseErrorException | Thrown if a parse error is encountered in the ReadFromStream method. |
TimeoutErrorException | This exception is not used. |
UnableCreateUPCEException | Thrown if the function to expand a UPC-E value to a UPC-A value fails. |
UnableReadBarcodeTypeException | Thrown if an unsupported barcode type is detected. |
UnsupportedBarcodeTypeException | Thrown if an unsupported barcode type is detected. |
UnableReadBitmapException | Thrown when a bitmap cannot be read, possibly because of an invalid bitmap handle. |
Error Codes
Listed below is a cross reference of error codes and their corresponding descriptions.
Error Codes | Error | Description |
9000 |
OutOfMemoryException |
There is not enough memory to continue the operation. |
9001 |
InvalidParameterException |
Invalid parameter. |
9002 |
ParameterOutOfRangeException |
Parameter out of range. |
9003 |
InvalidBitmapException |
Invalid bitmap. |
9004 |
UnableReadbitmapException |
Unable to read bitmap. |
9005 |
UnsupportBarcodeTypeException |
Unsupported barcode type. |
9006 |
InvalidIndexException |
Invalid index. |
9007 | InvalidBarcodeValueException | Invalid barcode value set. |
9008 | InsufficientWidthException | Insufficient barcode width. |
9009 | InsufficientHeightException |
Insufficient barcode height. |
9010 |
UnableCreateUPCEException |
Unable to create UPC-E Barcode. |
9011 |
InvalidLicenseException |
Invalid license. |
9012 |
TimeoutErrorException |
Timeout Error. |
9013 |
ImageNotAvailableException |
Image not available. |
9014 |
InternalErrorException |
Internal error. |
9015 |
InvalidAreaException |
Area is outside required range. |
9100 |
PDF417EncodingException |
PDF417 encoding error. |
9101 |
RowCountException |
Invalid row count for the barcode type. |
9102 |
ColumnCountException |
Invalid column count for the barcode type. |
9104 |
LargeDataSizeException |
Barcode data too large for the barcode symbol size. |
9105 |
InvalidErrorCorrectionLevelException |
Error correction level is invalid. |
9106 |
ErrorCorrectionLevelTooHighException |
Error correction level is too high, will not fit in barcode symbol with the data. |
9200 | StreamParseException | An error was encountered while parsing the stream data in the ReadFromStream method. |
If you receive a System.PlatformNotSupportedException on a 64-bit operating system, check that the application has been compiled for the x86 platform. |