This document describes how to use the basic features of the LEADTOOLS Barcode Demos, which demonstrate Barcode module features. These enable you to:
Create a Leadtools.RasterImage object from:
Loading using RasterCodecs.Load it from any image file using any of the file formats supported by LEADTOOLS
Scanning using TwainSession.Acquire from any TWAIN capable device such as a scanner or a camera
Setting the default barcode reading and writing options using BarcodeReader.GetDefaultOptions and BarcodeWriter.GetDefaultOptions. Saving and loading the options to disk using BarcodeReader.SaveOptions, BarcodeReader.LoadOptions, BarcodeWriter.SaveOptions and BarcodeWriter.LoadOptions
Read a certain barcode or barcodes from the image using BarcodeReader.ReadBarcode and BarcodeReader.ReadBarcodes
Export barcode data to disk as XML using BarcodeData.Save
Write any supported barcode on the image using BarcodeWriter.WriteBarcode
From the short-cuts menu in your LEADTOOLS installation Start Menu folder, select the following shortcut:
.NET Class Libraries\.NET Framework\Document\Barcode\Barcode 32-bit
Or this shortcut for the Silverlight version of the demo:
.NET Class Libraries\Silverlight\Document\Barcode\Barcode
Alternatively, you can run the pre-compiled demo directly from either of these locations:
[LEADTOOLS Setup Folder]\Bin\DotNet\Win32\CSBarcodeMainDemo_Original.exe
The LEADTOOLS Barcode Demo will launch and try to open the default sample barcode images (Barcode1.tif and Barcode2.tif) that ship with LEADTOOLS:
You can load your own image by accessing the "File/Open" menu item or "File/Scan/Acquire".
When you are ready for reading barcodes, select the "Barcode/Read Symbologies Options" to setup the read options. From this dialog, select what symbologies to read (by default all symbologies are selected), and you can drill down to the individual symbology or group of symbologies read options and fine tune them to your needs:
When you are satisfied with these options, click OK and the demo will automatically start reading the barcodes in the current open document. You can also read the barcodes at any time using the "Barcode/Read Barcodes" menu item (or hit the F5 keyboard shortcut). The demo will use the BarcodeReader.ReadSymbology event to show the barcodes as they are being read from the document:
When the dialog finishes reading the barcodes, select OKb> and the demo will add the read barcodes to the "Barcodes" list view, below the main view of the current page. Also, the demo will draw the barcodes on top of the image and will allow you to select barcodes to examine their properties using the mouse:
You can also read barcode(s) from a specific area of the page by either adding a region of interest ("Interactive/Region of interest" menu item) or directly rubber-banding the area of interest ("Interactive/Read barcode" menu item)
To write a barcode to the current open document page, select Barcode/Write barcode from the main menu (or select Interactive/Write barcode menu item). The following write barcode dialog will appear:
From this dialog, select the barcode symbology, its data and any extra options. In the example above, we selected to write a UPC Version A barcode with data equals to "01234567890" and at location (117, 163, 2264, 770 pixels).
After selecting OK, the toolkit will try to write the specified barcode. If successful, the demo will add this new barcode to the Barcodes list view and draw it on top of the image:
The demo contains additional functionality such as loading/saving options or barcode data, zooming in and out, panning, and many more.