Documentationsoftek Barcode
Documentationsoftek Barcode
V7.5.1
1 Contents
2 3 Overview ......................................................................................................................................... 1 Installation ...................................................................................................................................... 2 3.1 Installation of the toolkit for Development ............................................................................ 2 Completing the Installation............................................................................................. 2 Demonstration Application ............................................................................................. 3 Evaluation License Keys .................................................................................................. 3 Sample Projects............................................................................................................... 3
Redistribution and Installation on Production Systems ......................................................... 3 Using a Separate Folder for the DLL files ........................................................................ 4 Installation in Windows System Folders ......................................................................... 5 Installation in the Same Folder as Application................................................................ 5
3.3.1 3.3.2 4
Evaluating the SDK .......................................................................................................................... 6 4.1 4.2 Using the SoftekSDKDemo application ................................................................................... 6 Integration into applications ................................................................................................... 7
Licensing.......................................................................................................................................... 7 5.1 5.2 5.3 5.4 5.5 5.6 5.7 5.8 License Keys ............................................................................................................................ 7 Desktop Developer License ..................................................................................................... 7 Desktop Run-Time License ...................................................................................................... 7 Server License ......................................................................................................................... 8 Desktop Distribution License .................................................................................................. 8 Desktop and Server Distribution License ................................................................................ 8 Site License.............................................................................................................................. 8 Examples ................................................................................................................................. 8
Interfaces to the Toolkit................................................................................................................ 10 7.1 Windows DLL......................................................................................................................... 10 Handling String Values .................................................................................................. 10 Distribution ................................................................................................................... 11
7.1.1 7.1.2
7.2
7.2.1 7.3
7.3.1 7.4
7.5.1 7.6
7.6.1 8
Using the .net components on x86 and x64 systems ................................................................... 17 8.1 SoftekBarcodeLib2.dll ........................................................................................................... 17 Approach 1: Build for Any CPU .................................................................................. 17 Approach 2: Build for x86 or x64 ............................................................................ 17
SoftekBarcodeLib3.dll ........................................................................................................... 18 Approach 1: Install SoftekBarcode.dll etc in the Windows system folders .................. 18 Approach 2: Store SoftekBarcode.dll etc in a specific folder ........................................ 18
Supported Image Formats ............................................................................................................ 20 9.1 9.2 9.3 9.4 TIFF ........................................................................................................................................ 20 BMP ....................................................................................................................................... 20 Adobe PDF............................................................................................................................. 20 Other formats ....................................................................................................................... 20 Supported Barcode Formats ..................................................................................................... 21 1-D Barcode Formats ............................................................................................................ 21 2-D and Stacked Barcode Formats ........................................................................................ 21 Reading Barcodes from Adobe PDF Documents ....................................................................... 22 Understanding Confidence Levels for Barcode Reading ........................................................... 23 Reading Barcodes from Color Images ....................................................................................... 24 Splitting Documents According to Barcode Position ................................................................ 25 Tips on Reading Barcodes ......................................................................................................... 27 Skewed Barcodes .................................................................................................................. 27 Badly defined edges to bars .................................................................................................. 27
15.3 15.4
Noisy background to the image ............................................................................................ 27 White speckles in the black bars ........................................................................................... 28
Lines and other marks close to the left or right hand end of the barcode ....................................... 28 16 17 18 18.1 19 19.1 19.2 19.3 19.5 19.6 19.7 19.8 19.9 19.10 19.11 19.12 19.13 19.14 19.15 19.16 19.17 19.18 20 20.1 20.2 20.3 20.4 20.5 20.6 20.7 20.8 Reading Barcodes from Bitmaps Held in Memory .................................................................... 29 Using XML Files to store sets of properties .............................................................................. 30 Unicode File Paths..................................................................................................................... 31 PDF Documents ..................................................................................................................... 31 Appendix A: Methods Reference .............................................................................................. 32 List of methods...................................................................................................................... 32 CreateBarcodeInstance ......................................................................................................... 33 DestroyBarcodeInstance ....................................................................................................... 34 ExportXMLSettings ................................................................................................................ 35 GetBarString .......................................................................................................................... 38 GetBarStringPos, GetBarStringRect, BarStringPage, BarStringTopLeftX etc ........................ 39 GetBarStringType .................................................................................................................. 41 GetBarStringDirection ........................................................................................................... 42 GetLastError ...................................................................................................................... 43 GetLastWinError ............................................................................................................... 45 LoadXMLSettings............................................................................................................... 46 ProcessXML ....................................................................................................................... 49 SaveResults ....................................................................................................................... 51 ScanBarCode ..................................................................................................................... 53 ScanBarCodeFromBitmap ................................................................................................. 54 ScanBarCodeFromDIB ....................................................................................................... 56 SetScanRect ....................................................................................................................... 57
Appendix B: Properties Reference ............................................................................................ 58 Setting and Getting Property Values .................................................................................... 61 AllowDuplicateValues ........................................................................................................... 62 BitmapResolution.................................................................................................................. 62 CodabarMaxVariance............................................................................................................ 63 Code25Checksum.................................................................................................................. 63 Code39Checksum.................................................................................................................. 64 Code39NeedStartStop .......................................................................................................... 65 ColorChunks .......................................................................................................................... 65
20.9 20.10 20.11 20.12 20.13 20.14 20.15 20.16 20.17 20.18 20.19 20.20 20.21 20.22 20.23 20.24 20.25 20.26 20.27 20.28 20.29 20.30 20.31 20.32 20.33 20.34 20.35 20.36 20.37 20.38 20.39 20.40 20.41 20.42
ColorProcessingLevel ............................................................................................................ 65 ColorThreshold .................................................................................................................. 66 ConvertUPCEToEAN13 ...................................................................................................... 66 DatabarOptions ................................................................................................................. 67 Despeckle .......................................................................................................................... 67 Encoding ............................................................................................................................ 68 ErrorCorrection ................................................................................................................. 68 ExtendedCode39 ............................................................................................................... 68 FilePathEncoding ............................................................................................................... 69 GammaCorrection ............................................................................................................. 69 LicenseKey ......................................................................................................................... 69 LineJump ........................................................................................................................... 70 MaxLength ........................................................................................................................ 70 MedianFilter ...................................................................................................................... 70 MinLength ......................................................................................................................... 71 MinOccurrence ................................................................................................................. 71 MinSeparation................................................................................................................... 71 MinSpaceBarWidth ........................................................................................................... 71 MultipleRead ..................................................................................................................... 72 NoiseReduction ................................................................................................................. 72 PageNo .............................................................................................................................. 72 PatchCodeMinOccurrence ................................................................................................ 72 Pattern .............................................................................................................................. 73 Pdf417Debug..................................................................................................................... 73 PdfBpp ............................................................................................................................... 74 PdfDpi ................................................................................................................................ 74 PdfImageExtractOptions ................................................................................................... 74 PdfImageOnly .................................................................................................................... 75 PdfImageRasterOptions .................................................................................................... 75 Photometric ...................................................................................................................... 76 PrefOccurrence ................................................................................................................. 76 QuietZoneSize ................................................................................................................... 77 ReadCodabar ..................................................................................................................... 77 ReadCode128 .................................................................................................................... 77
20.43 20.44 20.45 20.46 20.47 20.48 20.49 20.50 20.51 20.52 20.53 20.54 20.55 20.56 20.57 20.58 20.59 20.60 20.61 20.62 20.63 20.64 20.65 20.66 20.67 20.68 20.69 20.70 21 21.1 21.2 21.3 22 22.1
ReadCode25 ...................................................................................................................... 78 ReadCode25ni ................................................................................................................... 78 ReadCode39 ...................................................................................................................... 78 ReadCode93 ...................................................................................................................... 79 ReadDatabar ..................................................................................................................... 79 ReadDataMatrix ................................................................................................................ 80 ReadEAN13........................................................................................................................ 80 ReadEAN8.......................................................................................................................... 80 ReadMicroPDF417 ............................................................................................................ 81 ReadNumeric..................................................................................................................... 81 ReadPatchCodes ............................................................................................................... 81 ReadPDF417 ...................................................................................................................... 81 ReadQRCode ..................................................................................................................... 82 ReadShortCode128 ........................................................................................................... 82 ReadUPCA ......................................................................................................................... 82 ReadUPCE .......................................................................................................................... 83 ScanDirection .................................................................................................................... 83 ShortCode128MinLength .................................................................................................. 84 ShowCodabarStartStop ..................................................................................................... 84 ShowCheckDigit ................................................................................................................ 84 SkewLineJump ................................................................................................................... 84 SkewTolerance .................................................................................................................. 85 TifSplitMode ...................................................................................................................... 85 TifSplitPath ........................................................................................................................ 86 UseOldCode128Algorithm ................................................................................................ 86 UseOverSampling .............................................................................................................. 87 UseRunCache .................................................................................................................... 87 WeightLongerBarcodes ..................................................................................................... 87
Appendix C: Installation Files .................................................................................................... 88 x86 Applications .................................................................................................................... 88 x64 Applications .................................................................................................................... 89 Any CPU Applications ........................................................................................................ 91 Appendix D: Release Notes ....................................................................................................... 92 Version 7.5.1.1 ...................................................................................................................... 92
Version 7.4.2.1 ...................................................................................................................... 92 Version 7.4.2.2 ...................................................................................................................... 92 Version 7.4.2.3 ...................................................................................................................... 92 Version 7.4.1 ......................................................................................................................... 92 Version 7.4.1.1 .............................................................................................................. 92 Version 7.4.1.2 .............................................................................................................. 93 Version 7.4.1.3 .............................................................................................................. 94 Version 7.4.1.4 .............................................................................................................. 94 Version 7.4.1.5 .............................................................................................................. 94 Version 7.4.1.6 .............................................................................................................. 94 Version 7.4.1.7 .............................................................................................................. 94
22.5.1 22.5.2 22.5.3 22.5.4 22.5.5 22.5.6 22.5.7 22.6 22.7 22.8 22.9 22.10 22.11 22.12 22.13 22.14 22.15 22.16 22.17 22.18 22.19 22.20 22.21 22.22 22.23 22.24 22.25 22.26 22.27 22.28
Version 7.3.1 ......................................................................................................................... 94 Version 7.2.1 ......................................................................................................................... 95 Version 7.1.4 ......................................................................................................................... 96 Version 7.1.3 ......................................................................................................................... 96 Version 7.1.2b ................................................................................................................... 97 Version 7.1.2 ..................................................................................................................... 97 Version 7.1.0a ................................................................................................................... 98 Version 7.1.0 ..................................................................................................................... 98 Version 7.0.10 ................................................................................................................... 99 Version 7.0.9 ..................................................................................................................... 99 Version 7.0.8 ................................................................................................................... 100 Version 7.0.7 ................................................................................................................... 100 Version 7.0.6 ................................................................................................................... 100 Version 7.0.5 ................................................................................................................... 100 Version 7.0.4 ................................................................................................................... 100 Version 7.0.3 ................................................................................................................... 100 Version 7.0.2 ................................................................................................................... 101 Version 7.0.1a ................................................................................................................. 101 Version 6.2.1a ................................................................................................................. 101 Version 6.2.1 ................................................................................................................... 101 Version 6.2.0d ................................................................................................................. 102 Version 6.1.1 ................................................................................................................... 103 Version 6.1.0 ................................................................................................................... 104
Version 6.0.10 ................................................................................................................. 105 Version 6.0.9 ................................................................................................................... 105 Version 6.0.8 ................................................................................................................... 105 Version 6.0.7 ................................................................................................................... 105 Version 6.0.6 ................................................................................................................... 106 Version 6.0.4 ................................................................................................................... 106 Version 6.0.3 ................................................................................................................... 106 Version 6.0.2 ................................................................................................................... 106 Version 6.0.1 ................................................................................................................... 107
2 Overview
The Softek Barcode Reader Toolkit for Windows is a set of dll files that can be used by applications to extract barcode values from image files and bitmaps held in memory. The toolkit uses no configuration files or registry settings and requires minimal installation on a production system. Some of the interfaces only require installation of a single dll file. Licenses are required for both development and run-time use of the toolkit please refer to the section on licensing for more details. The install set includes dll files for all interfaces to the toolkit, sample images and sample projects. Please note that the COM and OCX interfaces both require registration of a dll file see the section on Installation for more details The usual way to use the toolkit is to set a few properties, such as which types of barcode to read, and then call the ScanBarCode method to process the image. Note that by default the toolkit will exit when the first barcode is detected but it can be configured (see MultipleRead) to scan the entire document for barcodes, building up a list of detected values. The ScanBarCode method returns the number of detected barcodes and the value of each barcode can then be retrieved using the GetBarString method. The following code sample shows how the toolkit is typically used:
Set some properties, such as which barcodes should be scanned for barcode.SetLicenseKey(MY LICENSE KEY) barcode.SetReadCode39(true) barcode.SetReadDataMatrix(true) barcode.SetMultipleRead(true) Scan for barcodes nBarCodes = barcode.ScanBarCode(inputFile) Get the barcode values for i = 1 to nBarCodes do strValue = barcode.GetBarString(i) next i
The sample projects are an ideal way to start learning about the toolkit. There are examples for VB.Net, VC++ and VC# along with other samples, some of which have been contributed by Softeks customers. Softek offers free pre-sales support and 12 months support and upgrade cover after purchase please refer to the section on contact information for more details.
3 Installation
3.1 Installation of the toolkit for Development
The toolkit is delivered as a self extracting installer containing dll files, sample images, sample projects and installers for redistribution of the dll files. The installer simply copies the toolkit files to the target folder. Please note the following: No dll files in the toolkit are registered during the installation. Please see the section on completing the installation below. The toolkit cant be installed into a network drive because this might prevent the successful registration of components (if required).
The following table shows the contents of the installation folder: images java projects README.TXT RunDemo.bat Uninstall x64 x86 redist documentation.pdf LICENSE.TXT Sample barcode images Java class and sample java program Sample projects Important information (similar to that contained in this section) Runs x86/SoftekSDKDemo.exe Uninstallation exe files x64 based dll files and a demonstration application called SoftekSDKDemo.exe x86 based dll files and a 64-bit demonstration application called SoftekSDKDemo.exe Redistribution packages for x86 and x64 based systems. This document License document
3.1.1 Completing the Installation Registration of dll files is only necessary in the following circumstances: The OCX interface (SoftekBarcode.ocx) to the toolkit is to be used. The COM interface (SoftekATL.dll) to the toolkit is to be used. The target system is running a 64-bit version of Windows and Adobe PDF documents are to be processed.
Note: If the win32 dll, .net or Java interfaces are to be used then no registration is necessary. The dll files can be registered as follows: 1. In the x86-folder, right click on REGISTER.BAT and select Run as Administrator 2. If running on an x64 based system then do the same in the x64 folder No further steps are necessary though you may wish to modify the systems PATH environment variable or copy some of the dll files to the windows system folder so that they can be accessed by applications. Please refer to the section on Production Systems for more details. 2
3.1.2 Demonstration Application The toolkit can be demonstrated by running the application SoftekSDKDemo.exe (located in both the x86 and x64 folders). 3.1.3 Evaluation License Keys 30-day evaluation license keys can be obtained from [email protected] . Most interfaces can be used without a valid license key, though a pop up dialog box will be displayed when a barcode is read. 3.1.4 Sample Projects The install set includes a number of sample projects. All of the sample projects directly under the projects folder know the relative location of the x86 and x64 dll files and should need no configuration in order to work, except for the COM and OCX based projects which will require registration of certain files (see Completing the Installation above). The following table shows the sample projects available in the install set: VB.Net using .net VB.Net using com VB.Net using win32 dll VC# using .net VC++ using .net VC++ using ocx VC++ using win32 dll Other/ASP Other/Visual Basic 6 Other/Visual Studio 2003 using VB.Net Other/Contrib/Borland C++ using DLL Other/Contrib/Delphi Visual Studio 2005/2008/2010, Visual Basic using the .Net interface Visual Studio 2005/2008/2010, Visual Basic using the COM interface (*) Visual Studio 2005/2008/2010, Visual Basic using the win32 DLL interface Visual Studio 2005/2008/2010, Visual C# using the .Net interface Visual Studio 2005/2008/2010, Visual C++ using the .Net interface Visual Studio 2005/2008/2010, Visual C++ using the OCX interface (*) Visual Studio 2005/2008/2010, Visual C++ using the win32 DLL interface ASP example using the COM interface (*) Visual Basic 6 using the OCX interface (*) Visual Studio 2003 using the .Net interface Borland C++ Builder using the win32 DLL interface Delphi 2009 using the win32 DLL interface
* Requires registration of certain dll files please refer to Completing the Installation for further details.
3.2.1 Using a Separate Folder for the DLL files Storing all the dll files for the toolkit in a folder with a structure similar to the installation folder (as created by the self extracting installer) has the advantage of isolating the toolkit files from other dll files and can allow different versions of the toolkit to be used on the same system. For example, you may have a Softek sub-folder under an application, and in that folder have x86 and x64 sub-folders containing the necessary DLL files. 3.2.1.1 Win32 dll The simplest approach is to add either the x86 or x64 folder to the system PATH so that applications can find the SoftekBarcode.dll file as needed. This works well so long as there isnt another version of the dll in the windows system folder. In this case its still possible to load the correct version of the dll by using the LoadLibrary windows function (C++ projects may need to set the build option to delay loading the dll). Note that the dll will load other dll files from the same folder whatever the value of the PATH. This is the method used in the sample projects. 3.2.1.2 OCX and COM In the case of the OCX and COM interfaces, there is no work to do other than to register the appropriate dll files. Please refer to Completing the Installation for more details. 3.2.1.3 .net This approach is not applicable to the .net1 interface (implemented by SoftekBarcodeLib.dll) or the .net 2+ interface as implemented by SoftekBarcodeLib2.dll. It is however, well suited to the .net 2+ interface as implemented by SoftekBarcodeLib3.dll The BardecodeReader class constructor can take the location of the installation folder as an argument when the class is created. For example:
barcode = New SoftekBarcodeLib3.BarcodeReader("path\to\toolkit")
Note that the path/to/toolkit may be relative, so if you have a folder called Softek under the application folder and in that folder have x86 and x64 sub-folders, then you would create an instance as follows:
barcode = New SoftekBarcodeLib3.BarcodeReader("Softek")
The component will then load the correct supporting dll files from either the x86 or x64 folders. This is the method used in the sample projects. If the class is created without specifying the installation folder then either the x86 or x64 folders should be added to the system PATH according to the system architecture. 3.2.1.4 Java The simplest approach is to add either the x86 or x64 folder to the system PATH so that Java can find the bardecode_jni.dll and SoftekBarcode.dll files. 3.2.1.5 PDF File Support No configuration is necessary on x86 based systems. For x64 based systems please run REGISTER.BAT as the administrator in the x86-folder.
3.2.2 Installation in Windows System Folders Installing the dll files into the Windows System Folders has the advantage of making them immediately available to all applications but does have the potential to interfere with other applications that use the toolkit. The redist folder contains install sets for both x86 and x64 based systems (softek_barcode_redist_x86.exe and softek_barcode_redist_x64.exe). If PDF documents need to be processed on an x64 based system then please install both the x86 and x64 redistributable packages. Note that the DLL files used in these installers are identical to those found in the x86 and x64 folders. It is also possible to work out which files need to be installed for a given interface with reference to the tables in Appendix C.
3.2.3 Installation in the Same Folder as Application With this approach, only the specific DLL files necessary for the interface being used are installed into the same folder as the application. The tables in Appendix C detail the dependencies between the DLL files for the various interfaces. Note that this approach does not work on x64 systems if PDF File support is required. For example, if the .net interface implemented by SoftekBarcodeLib3.dll is being used, and PDF File support is not required, then the only files required are SoftekBarcodeLib3.dll and SoftekBarcode.dll. In the application the barcode object should be created without giving a path to the installation folder (e.g barcode = New SoftekBarcodeLib3.BarcodeReader()). 3.2.3.1 PDF File Support On an x86 based system, copy the following files from the x86-folder to the same folder as the application: SoftekBarcodePDF.dll, Cimage.dll, Convert.dll, Encryptpdf.dll, Pdf2image.dll and Pdf2Tif.dll This method is not possible for an x64 based system.
3.3 Upgrading
3.3.1 License Key Version 7.4.1 of the Softek Barcode Reader Toolkit for Windows is the first version of the toolkit to require a license key to be set at run-time. When upgrading to this version you will need to modify your code to set the license key property prior to calling the ScanBarCode method. 3.3.2 DLL Dependencies Please note that all components of this version have been built using Visual Studio 2008 and will therefore have different requirements to previous versions. Please refer to the table in Appendix C for further details. Also, note that if one DLL file is updated then so must all other DLL files. For example, this version of SoftekBarcode.dll will not function with previous versions of SoftekBarcodePDF.dll. 5
If the application wasnt able to find your barcode in the image then enter the number of barcodes you expected to find and click Run Tests the application will then try a number of different settings and generate a report. Click on Close to dismiss the results window. The results can be viewed at any time by clicking on the View menu and selecting Results. Settings for the SDK can be altered by clicking on the File menu and selecting Settings or using the short-cut Ctrl-S The label against a setting generally indicates the associated property and where this is not the case the help text underneath should explain. For example, Read Code 39 will set the property ReadCode39. Its also possible to scan an entire document for barcodes (rather than just the current page) by selecting the Scan all pages for barcodes option from the File menu. Image Display Options 6
Use the Image menu to move between pages of an image, change the size of the image on the screen or rotate the image. The menu can also be accessed by right clicking anywhere on the image.
5 Licensing
A license is required for each computer where any of the toolkit dll files will be installed either for development or run-time use. In this section: Toolkit refers to the Softek Barcode Reader Toolkit for Windows. Server version(s) of Windows means Windows Server 2003, Windows Server 2008 or any future version of Windows that includes the word Server in the title or is marketed as a server operating system. Desktop version(s) of Windows means any version of Windows that is not a Server version, such as Windows XP, Windows Vista or Windows 7.
There are deals available for unlimited site and distribution licenses. The Site and Distribution licenses allow for unlimited use of the barcode reader toolkit in return for a one-off payment. Note that Site and Distribution Licenses are available in Desktop and Server versions. All of the licenses are available either with or without support for Adobe PDF documents.
5.8 Examples
1. A software company has 1 developer and needs run-time licenses for 4 Desktop versions of Windows. Licenses required: 1 Desktop Developer License + 4 Desktop Run-Time Licenses 2. A software company has 1 developer and needs to deploy a license on a fax server. Licenses required: 1 Desktop Developer License + 1 Server License 3. A software company wish to add barcode recognition to their applications. They have a team of 4 developers who will need to work with the toolkit and would like to to distribute run-time licenses on Desktop versions of Windows without paying any further fees. Licenses required: 4 Desktop Developer License + Unlimited Desktop Distribution License 4. A company wishes to develop and deploy the barcode toolkit within their own organization. They are based at a single location and will require a large number of run-time licenses for both Desktop and Server versions of Windows. License required: 1 Site License 5. Sames a example 4 above, but the company needs to deploy their application at a number of locations within the organization. There is a development team of 8 people. License required: 8 Desktop Developer License + 1 Desktop and Server Distribution License.
6 Contact Information
6.1 Sales
Softek Softwares online store can be found at the following URL: http://www.bardecode.com/en/purchase.html For all sales enquiries please contact [email protected] or call +44 1296 663 633. Softek Software can provide quotations on request and can also accept payment by wire transfer or check.
6.2 Support
Softek Software offers free pre-sales support for the Barcode Reader Toolkit and all licenses include 12 months support and upgrade cover. Softek Software online knowledge base can be found at the following URL: http://www.bardecode.com/en/knowledge-base.html For all support enquiries please contact [email protected]
7.1.1 Handling String Values Strings passed to and returned from the DLL are C style strings i.e. pointers to an array of bytes terminated by a byte with value 0 (null). This means that Visual Basic applications need to convert the returned values as follows: VB6 applications can use a function such as nullTrim: nBarCodes = mtScanBarCode(hBarcode, input.tif) For i = 1 To nBarCodes strBarcode = nullTrim(mtGetBarString(hBarcode, i)) Next i
10
Function nullTrim(s As String) As String ' Trim the string to the null character Dim n As Integer n = InStr(s, Chr$(0)) If (n > 0) Then nullTrim = Trim(Left(s, n - 1)) Else nullTrim = Trim(s) End If End Function VB.Net applications should use code similar to: strBarcode = System.Runtime.InteropServices.Marshal.PtrToStringAnsi(mtGetBarString (hBarcode, i))) 7.1.2 Distribution Please note that distribution of this file is strictly subject to license. x86: x64: Registration: Dependencies: None x86/SoftekBarcode.dll x64/SoftekBarcode.dll no
7.2 OCX/ActiveX
The ocx interface is provided by the file SoftekBarcode.ocx, which in turn wraps around the SoftekBarcode.dll interface. The ocx is typically used in VB6 projects where it provides access to the toolkit through an object and string handling is also simpler. VB6 Example: nBarCodes = SoftekBarcode1.ScanBarCode(Path) For i = 1 To nBarCodes value = SoftekBarcode1.GetBarString(i) Next i 7.2.1 Distribution Please note that distribution of this file is strictly subject to license. x86: x64: x86/SoftekBarcode.ocx N/A
11
yes
SoftekBarcode.dll
There is no x64 version of the ocx interface See also: Appendix C: Installation Files
12
These components can be used in .net applications developed with Visual Studio 2005 or later. To use the component a reference should be added in the project to the SoftekbarcodeLib2.dll or SoftekBarcodeLib3.dll files and the barcode object can then be created in the following way: For SoftekBarcodeLib2.dll: barcode = New SoftekBarcodeLib2.BarcodeReader nBarCodes = barcode.ScanBarCode(Path) For i = 1 To nBarCodes value = barcode.GetBarString(i) Next i barcode.ReleaseResources() And for SoftekBarcodeLib3.dll: Either: barcode = New SoftekBarcodeLib3.BarcodeReader nBarCodes = barcode.ScanBarCode(Path) For i = 1 To nBarCodes value = barcode.GetBarString(i) Next i which assumes that dll files needed by the component are in the windows system folder. Or: barcode = New SoftekBarcodeLib3.BarcodeReader(pathToSoftekBarcodeSDK) nBarCodes = barcode.ScanBarCode(Path) For i = 1 To nBarCodes 13
value = barcode.GetBarString(i) Next i where pathToSoftekBarcodeSDK is the path to a folder storing the x86 and x64 dll files in folders of the same name (i.e. it should have 2 sub-folders named x86 and x64, storing the appropriate dll files). 7.4.1 Distribution of SoftekBarcodeLib2.dll Please note that distribution of this file is strictly subject to license. SoftekBarcode x86: x64: Registration: Dependencies: Visual C++ 2008 SP1 Redistributable Package Requires SoftekBarcode.dll if documents are to split into PDF format. x86/SoftekBarcodeLib2.dll x64/SoftekBarcodeLib2.dll no
See also: Using the .net components on x86 and x64 systems Appendix C: Installation Files
7.4.2 Distribution of SoftekBarcodeLib3.dll Please note that distribution of this file is strictly subject to license. SoftekBarcode AnyCPU Registration: Dependencies: SoftekBarcode.dll anycpu/SoftekBarcodeLib3.dll no
See also: Using the .net components on x86 and x64 systems Appendix C: Installation Files
14
use the component a reference should be added in the project to the SoftekbarcodeLib.dll file and the barcode object can then be created in the following way: barcode = New SoftekBarcodeLib.BarcodeReader nBarCodes = barcode.ScanBarCode(Path) For i = 1 To nBarCodes value = barcode.GetBarString(i) Next i NOTE: The .Net 1 component is not able to process PDF Documents. 7.5.1 Distribution Please note that distribution of this file is strictly subject to license. x86: x64: Registration: Dependencies: None x86/SoftekBarcodeLib.dll Not available no
15
x86/bardecode_jni.dll x64/bardecode_jni.dll no
SoftekBarcode.dll
16
8.1 SoftekBarcodeLib2.dll
There are separate versions of SoftekBarcodeLib2.dll for x86 and x64 based system, so care needs to be taken to ensure that applications reference the correct version in any given installation. There are two approaches that can be taken to using this component in Visual Basic .Net and Visual C# projects. In Visual C++ projects the x86 and x64 versions of the .net assembly may need to be switched manually. 8.1.1 Approach 1: Build for Any CPU If you want to build your application for Any CPU and ensure that you reference the correct .net assembly on either an x86 or x64 based system then it is recommended that you do the following: 1. On an x86 based system install the x86 version of SoftekBarcodeLib2.dll in C:\windows\system32 2. On an x64 based system install the x86 version of SoftekBarcodeLib2.dll in C:\windows\SysWOW64 and the x64 version in C:\windows\system32 3. In your application, set the reference path to search c:\windows\SysNative first, followed by c:\windows\System32 second. This will ensure that the correct component is loaded for the correct architecture. 8.1.2 Approach 2: Build for x86 or x64 This approach means that you need to target a specific architecture but has the advantage of working better with the publish wizard in visual studio. 1. Change the configuration for your project to either x86 or x64. 2. Add a reference to the appropriate version of SoftekBarcodeLib2.dll from the toolkit in either the x86 or x64 folders. 3. Close the project 4. Open the .vbproj or .csproj file with notepad, search for SoftekBarcodeLib2.dll and edit the HintPath, replacing x86 or x64 with $(Platform). Example change to HintPath: Before: <HintPath>..\..\x86\SoftekBarcodeLib2.dll</HintPath> After: <HintPath>..\..\$(Platform)\SoftekBarcodeLib2.dll</HintPath> When you next open the project you should be able to switch between x86 and x64 targets and build/publish your application for either target.
17
8.2 SoftekBarcodeLib3.dll
The SoftekBarcodeLib3.dll component is architecture independent though it does rely on the SoftekBarcode.dll file which has separate x86 and x64 versions. Again, there are 2 approaches to using the component on x86 and x64 systems: 8.2.1 Approach 1: Install SoftekBarcode.dll etc in the Windows system folders This approach relies on Windows to load the correct version of SoftekBarcode.dll appropriate to the system architecture: Target folder for x86/SoftekBarcode.dll file windows\system32 windows\SysWOW64 Target folder for x64/SoftekBarcode.dll file N/A windows\system32
And create the SoftekBarcodeLib3.BarcodeReader class as follows: barcode = New SoftekBarcodeLib3.BarcodeReader Please refer to Installation Files for more details. 8.2.2 Approach 2: Store SoftekBarcode.dll etc in a specific folder This approach allows you to store all the dll files for the toolkit in a single folder, with a structure identical to the install set supplied by Softek. When an instance of the BarcodeReader class is created the path to this folder must be specified: barcode = New SoftekBarcodeLib3.BarcodeReader(pathToSoftekBarcodeSDK) pathToSoftekBarcodeSDK should contain 2 sub-folders named x86 and x64, holding all the supporting dll files for the toolkit. This approach also allows different versions of the toolkit engine to be used in isolation.
18
Run dcomcnfg.exe From Console Root, expand Component Services/Computers/My Computer/DCOM Config Scroll down to locate PDF2Image.CPDF2Image, right click on the item and select Properties. Click on the Security tab In Launch and Activate Permissions select Customize and click on Edit. If IIS_IUSRS is not in the list then click on Add and enter IIS_IUSRS before clicking on OK. Grant IIS_IUSRS permission for Local Launch and Local Activation. Click on OK to exit from Launch and Activate Permissions and then click on OK to exit from Properties. Repeat for PDF2TIFCom.CPDF2TIFCom
19
The .Net interfaces provided by SoftekBarcodeLib.dll and SoftekBarcodeLib2.dll use the .Net framework to load image files into memory and generally support a more limited set of TIF compressions.
9.2 BMP
The SDK supports single plane BMP files in either 1-bit (black and white), 8-bit (gray scale), 24 bit (color) or 32-bit (color) format.
20
21
22
23
24
e.g c:\tmp\Output%d.tif will create files Output1.tif, Output2.tif etc The format of the output document is determined by the file extension used for the TifSplitPath property. TIF files may be split into either TIF or PDF format where as PDF documents may only be split into PDF format. TifSplitMode controls how the input pages are copied to the output documents. Mode=0 creates output files that contain a barcode on page 1 (the first output file will always start with page 1 of the input file). Mode=1 creates output files that contain a barcode on the last page (the last output file will always end with the last page of the input file). Mode=2 creates output files that contain no barcodes. A new output document is started each time the software finds a barcode in the input file.
Example: Suppose there is a 6 page TIF file with barcodes on pages 2 and 5. The barcode on page 2 has the value "AAAAAA" and the barcode on page 5 has the value "BBBBBB" barcode.TifSplitPath = "C:\tmp\Output%s_%d.tif" barcode.TifSplitMode = 0 barcode.ScanBarCode(InputPath) ...will create 3 output files. Output_1.tif will contain page 1, OutputAAAAAA_2.tif will contain pages 2, 3 and 4, and OutputBBBBBB_3.tif will contain pages 5 and 6. barcode.TifSplitPath = "C:\tmp\Output%s_%d.tif" barcode.TifSplitMode = 1 barcode.ScanBarCode(InputPath) ...will create 3 output files. OutputAAAAAA_1.tif will contain pages 1 and 2, OutputBBBBBB_2.tif will contain pages 3, 4 and 5, and Output_3.tif will contain page 6.
25
barcode.TifSplitPath = "C:\tmp\Output%s_%d.tif" barcode.TifSplitMode = 2 barcode.ScanBarCode(InputPath) ...will create 3 output files. Output_1.tif will contain page 1, OutputAAAAAA_2.tif will contain pages 3 and 4, and OutputBBBBBB_3.tif will contain page 6.
26
By default, the toolkit does not read barcodes that are badly skewed as in the above example. Tip: try setting SkewTolerance to a value between 1 and 5. You may also need to descrease the value of SkewLineJump to a value such as 1 though this will slow down the recognition speed.
In these cases the bars have joined together in certain places, which makes it difficult for the toolkit to separate the bars and determine their relative sizes. Tip: Try setting NoiseReduction to a value between 10 and 20.
Similar to the above problem except the entire image will typically contain black dots in the background. Tip: Try setting NoiseReduction to a value between 5 and 10.
27
In these cases the image will typically contain black dots in the background and white dots in the black bars. Tip: Try setting NoiseReduction to a value between 5 and 10 and Despeckle to True. Black speckles in the spaces between bars White speckles in the bars
Lines and other marks close to the left or right hand end of the barcode
Most barcodes should have a quite zone around the barcode, to distinguish the barcode from the rest of the image however, as in the above example its not unusual for barcodes to be printed in boxes which may result in the barcode being ignored by the toolkit. Tip: Measure the distance in pixels between the barcode and the edge of the box and try setting QuietZoneSize to a value slightly less than this distance. Typically this might be a value between 10 and 20. Use values less than 5 with care because they can result in false positive readings for certain barcode types.
28
29
30
31
32
19.2 CreateBarcodeInstance
Syntax mtCreateBarcodeInstance() Return Value Handle to an instance of the barcode toolkit (dll only). Remarks Create an instance of the barcode toolkit and return a handle that may be used with other functions in the win32 dll interface. Please note that this function is not applicable to other interfaces for the toolkit. This function only exists in the dll interface to the SDK. Example: Dim hBarcode As System.IntPtr hBarcode = mtCreateBarcodeInstance() mtSetReadCode39(hBarcode, True) Win32 dll declarations: VB.Net: Private Declare Function mtCreateBarcodeInstance Lib "Softekbarcode" () As System.IntPtr Visual C++: extern "C" { HANDLE __stdcall mtCreateBarcodeInstance() ; } See also: DestroyBarcodeInstance
33
19.3 DestroyBarcodeInstance
Syntax mtDestroyBarcodeInstance(hBarcode) Parameters hBarcode Return Value 1/True on success and 0/False on failure. Remarks DestroyBarcodeInstance destroys an instance of the barcode toolkit and releases any resources used by the toolkit. This function only exists in the dll interface to the SDK. Example: Dim hBarcode As System.IntPtr hBarcode = mtCreateBarcodeInstance() mtDestroyBarcodeInstance(hBarcode) Win32 dll declarations: VB.Net: Private Declare Function mtDestroyBarcodeInstance Lib "Softekbarcode" (ByVal hBarcode As System.IntPtr) As Short Visual C++: extern "C" { short __stdcall mtDestroyBarcodeInstance(HANDLE hBarcode) ; } See also: CreateBarcodeInstance Handle to an instance of the barcode toolkit.
34
19.5 ExportXMLSettings
Synyax .net/com/java/ocx: dll: Parameters hBarcode filePath Return Value 1/True on success and 0/False on failure. Remarks ExportXMLSettings saves the current property values to an XML format file. The settings could be modified and loaded again using LoadXMLSettings. The default set of properties is as follows: <xml version='1.0' encoding='iso-8859-1'> <SoftekBarcode> <Properties> <AllowDuplicateValues>1</AllowDuplicateValues> <BitmapResolution>200</BitmapResolution> <CodabarMaxVariance>20</CodabarMaxVariance> <Code25Checksum>0</Code25Checksum> <Code25MinOccurrenceLength>5</Code25MinOccurrenceLength> <Code39Checksum>0</Code39Checksum> <Code39NeedStartStop>1</Code39NeedStartStop> <ColorChunks>1</ColorChunks> <ColorProcessingLevel>2</ColorProcessingLevel> <ColorThreshold>0</ColorThreshold> <ConvertUPCEToEAN13>1</ConvertUPCEToEAN13> <Despeckle>0</Despeckle> <Encoding>0</Encoding> <ErrorCorrection>0</ErrorCorrection> <ExtendedCode39>0</ExtendedCode39> <GammaCorrection>100</GammaCorrection> <LineJump>1</LineJump> <MaxLength>999</MaxLength> <MedianFilter>0</MedianFilter> <MinSeparation>180</MinSeparation> <MinLength>4</MinLength> 35 Handle to an instance of the barcode toolkit (dll only). Path to the xml file to be created. Object.ExportXMLSettings(filePath) mtExportXMLSettings(hBarcode, filePath)
<MinOccurrence>2</MinOccurrence> <MinSpaceBarWidth>0</MinSpaceBarWidth> <MultipleRead>0</MultipleRead> <NoiseReduction>0</NoiseReduction> <PageNo>0</PageNo> <PatchCodeMinOccurrence>30</PatchCodeMinOccurrence> <Pattern></Pattern> <Pdf417Debug>0</Pdf417Debug> <PdfBpp>8</PdfBpp> <PdfDpi>300</PdfDpi> <Photometric>0</Photometric> <PrefOccurrence>5</PrefOccurrence> <QuietZoneSize>0</QuietZoneSize> <ReadCodabar>1</ReadCodabar> <ReadCode128>1</ReadCode128> <ReadCode25ni>0</ReadCode25ni> <ReadCode25>1</ReadCode25> <ReadCode39>1</ReadCode39> <ReadCode93>0</ReadCode93> <ReadDatabar>0</ReadDatabar> <ReadDataMatrix>0</ReadDataMatrix> <ReadEAN8>1</ReadEAN8> <ReadEAN13>1</ReadEAN13> <ReadMicroPDF417>0</ReadMicroPDF417> <ReadNumeric>0</ReadNumeric> <ReadPatchCodes>0</ReadPatchCodes> <ReadPDF417>0</ReadPDF417> <ReadQRCode>0</ReadQRCode> <ReadShortCode128>0</ReadShortCode128> <ReadUPCA>0</ReadUPCA> <ReadUPCE>1</ReadUPCE> <ScanDirection>15</ScanDirection> <ShortCode128MinLength>2</ShortCode128MinLength> <SkewLineJump>9</SkewLineJump> <SkewTolerance>0</SkewTolerance> <ShowCheckDigit>0</ShowCheckDigit> <ShowCodabarStartStop>1</ShowCodabarStartStop> <SkewSpeed>3</SkewSpeed> <UseOldCode128Algorithm>0</UseOldCode128Algorithm> <UseRunCache>1</UseRunCache> <UseOverSampling>0</UseOverSampling> <WeightLongerBarcodes>1</WeightLongerBarcodes> </Properties> </SoftekBarcode> </xml> 36
Win32 dll declarations: VB.Net: Private Declare Function mtExportXMLSettings Lib "SoftekBarcode" (ByVal hBarcode As System.IntPtr, ByVal strFile As String) As Short Visual C++: extern "C" { int __stdcall stExportXMLSettings(LPCSTR filePath) ; }
37
19.6 GetBarString
Syntax .net/java/ocx: Object.GetBarString(n) com: Object.BarString(n) dll: mtGetBarString (hBarcode, n) Parameters hBarcode n Return Value GetBarString retrieves a barcode string that has been detected by the ScanBarCode method. In .net applications, use System.Runtime.InteropServices.Marshal.PtrToStringAnsi to convert the IntPtr returned by mtGetBarString to a String. Remarks Check digit characters are only output if the ShowCheckDigit property is set to True. UPC-E barcodes are a zero-suppressed version of EAN-13 and as such are converted to EAN13 format unless the ConvertUPCEToEAN13 property is set to False. Code 39 barcodes are not returned with the start/stop * characters. Codabar barcode value are always returned with the start/stop character pair, which can be either a/t, b/n, c/* or d/n. The following strings can be returned for patch codes - "Type I", "Type II", "Type III", "Type IV", "Type VI" and "Type T". Handle to an instance of the barcode toolkit (dll only). 1-based index to barcode to be queried.
Win32 dll declarations: VB.Net: Private Declare Function mtGetBarString Lib "SoftekBarcode" (ByVal hBarcode As System.IntPtr, ByVal nBarCode As Short) As System.IntPtr Visual C++: extern "C" { LPCSTR __stdcall mtGetBarString(HANDLE hBarcode, short index); }
38
39
Win32 dll declarations: VB.Net: Private Declare Function mtGetBarStringPos Lib "SoftekBarcode" (ByVal hBarcode As System.IntPtr, ByVal nBarCode As Short, ByRef TopLeftX As Integer, ByRef TopLeftY As Integer, ByRef BottomRightX As Integer, ByRef BottomRightY As Integer) As Short Visual C++: short __stdcall mtGetBarStringPos(HANDLE hBarcode, short nBarCode, long FAR* pTopLeftX, long FAR* pTopLeftY, long FAR* pBotRightX, long FAR* pBotRightY);
40
19.8 GetBarStringType
Syntax .net/java/ocx: Object.GetBarStringType(n) com: Object.BarStringType(n) dll: mtGetBarStringType(hBarcode, n) Parameters hBarcode n Return Value GetBarStringType returns a string representing the type of barcode. In .net applications, use System.Runtime.InteropServices.Marshal.PtrToStringAnsi to convert the IntPtr returned by mtGetBarString to a String. Remarks Call GetBarStringType after calling ScanBarCode to determine the types of barcode found in a document. Examples of values returned by the function are CODE39 and CODE128. Win32 dll declarations: VB.Net: Private Declare Function mtGetBarString Lib "SoftekBarcode" (ByVal hBarcode As System.IntPtr, ByVal nBarCode As Short) As System.IntPtr Visual C++: extern "C" { LPCSTR __stdcall mtGetBarString(HANDLE hBarcode, short index); } Handle to an instance of the barcode toolkit (dll only). 1-based index to barcode to be queried.
41
19.9 GetBarStringDirection
Syntax .net/java/ocx: Object.GetBarStringDirection(n) com: Object.BarStringDirection(n) dll: mtGetBarStringDirection(hBarcode, n) Parameters hBarcode n Return Value 1 = Left to Right 2 = Top to Bottom 4 = Right to Left 8 = Bottom to Top 16 = Top Left to Bottom Right 32 = Top Right to Bottom Left 64 = Bottom Right to Top Left 128 = Bottom Left to Top Right Remarks: Call GetBarStringDirection after calling ScanBarCode to determine the orientations of barcode found in a document. Note that this function will always return 1 for a QR-Code. Win32 dll declarations: VB.Net: Private Declare Function mtGetBarStringDirection Lib "SoftekBarcode" (ByVal hBarcode As System.IntPtr, ByVal nBarCode As Short) As Short Visual C++: extern "C" { short __stdcall mtGetBarStringDirection(HANDLE hBarcode, short nBarCode) ; } Handle to an instance of the barcode toolkit (dll only). 1-based index to barcode to be queried.
42
19.10 GetLastError
Syntax .net/java/ocx: Object.GetLastError() com: Object.LastError() dll: mtGetLastError() Parameters hBarcode Return Value Please refer to the following table for an explanation of the possible error numbers:
1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 3000 3001 3002 3003 Failed to load SoftekBarcodePDF.dll Failed to find a function in SoftekBarcodePDF.dll Failed to get the path for the temp file folder Failed to generate a temporary name Failed to generate a temp file name Failed to load SoftekBarcodePDF.dll Failed to find a function in SoftekBarcodePDF.dll Failed to load SoftekBarcodePDF.dll Failed to find a function in SoftekBarcodePDF.dll Failed to open a BMP file Failed to read BMP file header Failed to read BMP file info Memory allocation problem when loading a bitmap Memory allocation problem when loading a bitmap Error creating bitmap handle Failed to create handle for URL Failed to open requested URL Failed to open temporary file for contents of URL File open failed. Null dib handle supplied to mtScanBarCodeFromDIB Failed to find a function in SoftekBarcodePDF.dll Failed to load SoftekBarcodePDF.dll Failed to load pdf2image.dll PDF conversion returned zero or negative page count Failed to load pdf2image.dll Failed to load a function in pdf2image.dll PDF conversion returned null handle Failed to load pdf2tif.dll Failed to find a function in pdf2image.dll Failed to find a function in pdf2image.dll Requested page number is out of range Requested page number is out of range PDF conversion failed PDf conversion failed Failed to find a function in pdf2image.dll Failed to find a function in pdf2image.dll Failed to load file as a PDF document - probably a format error Failed to generate full path name No access to document Failed to connect to COM server PDF2ImageCOM.exe Failed to connect to COM server PDF2ImageCOM.exe Get page count function failed Get page box function failed
43
Internal error in PDFToImageDrawToHDC Failed to connect to COM server PDF2TIFCOM.exe Failed to connect to COM server PDF2TIFCOM.exe
Remarks: Call GetLastError to retrieve the last internal error number for the toolkit . Win32 dll declarations: VB.Net: Private Declare Function mtGetLastError Lib "SoftekBarcode" (ByVal hBarcode As System.IntPtr) As Short Visual C++: extern "C" { short __stdcall mtGetLastError(HANDLE hBarcode) ; }
44
19.11 GetLastWinError
Syntax .net/java/ocx: Object.GetLastWinError() com: Object.LastWinError() dll: mtGetLastWinError() Parameters hBarcode Return Value The last windows error number, as recorded at the time of the last toolkit error. Remarks: Call GetLastWinError to retrieve the windows error number. Win32 dll declarations: VB.Net: Private Declare Function mtGetLastWinError Lib "SoftekBarcode" (ByVal hBarcode As System.IntPtr) As Short Visual C++: extern "C" { short __stdcall mtGetLastWinError(HANDLE hBarcode) ; } Handle to an instance of the barcode toolkit (dll only).
45
19.12 LoadXMLSettings
Syntax Loading from xml file: .net/java: com/ocx: dll: Object.LoadXMLSettings(file) Object.LoadXMLSettings(file, silent) mtLoadXMLSettings(hbarcode, file, silent)
Loading from string: .net/java: com/ocx: dll: Parameters hBarcode file string silent Return Value 1/True on success and 0/False on failure. Remarks Load settings from the specified XML file or string. This method can also be used to define sets of properties to be applied sequentially to an image until a barcode is located. It's also possible to specify properties that only apply to particular pages of an image. The silent parameter controls whether message message boxes will be displayed if there is a parsing error. Note that when loading from a string the XML data can be in the abbreviated form: <PropertyName>Value</PropertyName> For the com object, use the XMLRetval property to obtain the return value for the function. The simplest format for the xml is as follows: <xml> <SoftekBarcode> <Properties> <PropertyName>PropertyValue</PropertyName> </Properties> </SoftekBarcode> </xml> Example: 46 Handle to an instance of the barcode toolkit (dll only). Path to the xml file to be loaded. String holding the xml property values. Integer or boolean value. 1/True will suppress error messages. Object.LoadXMLSettings(string) Object.LoadXMLSettings(string, silent) mtLoadXMLSettings(hbarcode, string, silent)
Set MedianFilter to 1 (True) and set ReadCode25 to 0 (False). <xml> <SoftekBarcode> <Properties> <MedianFilter>1</MedianFilter> <ReadCode25>0</ReadCode25> </Properties> </SoftekBarcode> </xml> The xml file can also be used to apply sets of properties sequentially to an image until a barcode is found: This example first applies default values to an image. If no barcode is found then a MedianFilter is applied. <xml> <SoftekBarcode> <Properties> </Properties> <Properties> <MedianFilter>1</MedianFilter> </Properties> </SoftekBarcode> </xml> This example restricts the search to the first 3 pages of an image, until a barcode is located: <xml> <SoftekBarcode> <Properties> <PageNo>1</PageNo> </Properties> <Properties> <PageNo>2</PageNo> </Properties> <Properties> <PageNo>3</PageNo> </Properties> </SoftekBarcode> </xml> The default set of properties can be found in the manual page for ExportXMLSettings. Win32 dll declarations: VB.Net: 47
Private Declare Function mtLoadXMLSettings Lib "SoftekBarcode" (ByVal hBarcode As System.IntPtr, ByVal strFile As String, ByVal silent As Boolean) As Short Visual C++: extern "C" { int __stdcall mtLoadXMLSettings(HANDLE hBarcode, LPCSTR filePath, unsigned char silent) ; }
48
19.13 ProcessXML
Syntax .net: com: ocx: dll: Integer Object.ProcessXML (inputFile, outputFile) Object. ProcessXML (inputFile, outputFile, silent) BOOL Object. ProcessXML (inputFile, outputFile, silent) BOOL mtProcessXML (hbarcode, inputFile, outputFile, silent)
Parameters hBarcode inputFile ouputFile silent Return Value 1/True on success and 0/False on failure. For the COM object, use the XMLRetval property to obtain the return value for the function. Remarks ProcessXML takes property values, file names and folder names from the inputFile and creates outputFile in either XML or CSV file format. The property values defined in the XML file follow the specification as defined in the manual page for LoadXMLSettings. The files and folder to process are defined in the following way.... To process a file: <Process> <File>/path/to/image.tif</File> </Process> To process the images in a folder: <Process> <Folder>/path/to/folder</Folder> </Process> Both the File and Folder tags accept an optional id attribute. This can be used in the output to identify the image file or folder. Example: <xml> <SoftekBarcode> <Properties> </Properties> <Properties> 49 Handle to an instance of the barcode toolkit (dll only). Path to the xml file to be processed. Path to the xml or csv file to be created. Integer or boolean value. 1/True will suppress error messages.
<MedianFilter>1</MedianFilter> </Properties> <Process> <File id=1001>C:\tmp\image1.tif</File> <File id=1002>C:\tmp\image2.tif</File> <File id=1003>C:\tmp\image3.tif</File> <Folder id=9001>C:\tmp\images</Folder> </Process> </SoftekBarcode> </xml> See the manual page for SaveResults for the output file format. Win32 dll declarations: VB.Net: Private Declare Function mtProcessXML Lib "SoftekBarcode" (ByVal hBarcode As System.IntPtr, ByVal strInputFile As String, ByVal strOutputFile As String) As Short Visual C++: extern "C" { int __stdcall mtProcessXML(HANDLE hBarcode, LPCSTR inputFilePath, LPCSTR outputFilePath, unsigned char silent) ; }
50
19.14 SaveResults
Overview .net/ocx: com: dll: Parameters hBarcode file Return Value 1/True on success and 0/False on failure. Remarks SaveResults saves the current set of results to an XML or CSV file. The outputFile format is determined by the file extension (csv or xml). The CSV fields are as follows: Folder - location of image file File Name Count - number of barcodes found in image Index - Index for this bar code (1,2,3 etc or -1 is no barcode found). Error - Error number ID - as specified in an xml input file for image or folder (see ProcessXML ) Value - value of barcode Type - type of barcode Hits - hit count for this barcode Page - page number in image Direction - ScanDirection mask value for this barcode TopLeftX - x position for top left TopLeftY - y position for top left BottomRightX - x position for bottom right BottomRightY - y position for bottom right The XML output format contains the same information as the CSV format, but arranged in the following way: <xml version='1.0' encoding='iso-8859-1'> <SoftekBarcode> <Result> <Folder>location of image file</Folder> <FileName>name of file</FileName> <Count>number of barcodes</Count> 51 Handle to an instance of the barcode toolkit (dll only). Path to the xml or csv file to be created. Object.SaveResults (file) Object. SaveXMLResults (file) mtSaveResults (hbarcode, file)
<Error>error number</Error> <ID>id as specified in an xml input file for image or folder (see ProcessXML)</ID> Repeated for each barcode found in image <Barcode> <Value>value of barcode</Value> <Type>type of barcode</Type> <Hits>score</Hits> <Page>page number</Page> <Direction>ScanDirection mask value for this barcode</Direction> <TopLeftX>x position for top left</TopLeftX> <TopLeftY>y position for top left</TopLeftY> <BottomRightX>x position for bottom right</BottomRightX> <BottomRightY>y position for bottom right</BottomRightY> </Barcode> </Result> </SoftekBarcode> </xml> Win32 dll declarations: VB.Net: Private Declare Function mtSaveResults Lib "SoftekBarcode" (ByVal hBarcode As System.IntPtr, ByVal strOutputFile As String) As Short Visual C++: extern "C" { int __stdcall mtSaveResults(HANDLE hBarcode, LPCSTR filePath); }
52
19.15 ScanBarCode
Syntax .net/com/java/ocx: dll: Parameters hBarcode file Return Value -1 -2 -3 -4 -5 -6,-7,-8 Remarks Scan the specified image file for bar code strings and return the number of bar codes found in the file. Note that the function will stop when the first barcode is found in a document unless the MulipleRead property is set to True. Further information for errors can be found by calling the GetLastError and GetLastWinError functions. Win32 dll declarations: VB.Net: Private Declare Function mtScanBarCode Lib "SoftekBarcode" (ByVal hBarcode As System.IntPtr, ByVal strFile As String) As Short Error opening file BMP file is multi-plane Invalid number of bits per sample Memory allocation error Invalid tif photometric property Invalid license key. Handle to an instance of the barcode toolkit (dll only). Path to the file containing the image to be scanned for barcodes. Object.ScanBarCode(file) mtScanBarCode(hBarcode, file)
Visual C++: extern "C" { short __stdcall mtScanBarCode(HANDLE hBarcode, LPCTSTR file); }
53
19.16 ScanBarCodeFromBitmap
Syntax .net: .net/com/ocx: dll: Parameters hBarcode bitmap hBitmap Return Value -1 -2 -3 -4 -5 -6,-7,-8 Remarks Scan the specified device dependent bitmap for bar code strings and return the number of bar codes found. The image must be single plane. Note that hBitmap is a HANDLE to a BITMAP, not the address of a BITMAP structure. The Windows GDI function, CreateBitmapIndirect can be used to create an HBITMAP from a BITMAP structure. Note that the function will stop when the first barcode is found in a document unless the MulipleRead property is set to True. The managed component supports 2 forms of this function: ScanBarCodeFromBitmap(IntPtr hBitmap) ScanBarCodeFromBitmap(System.Drawing.Bitmap bitmap) (Managed Component Only) Scan the specified managed bitmap object for bar code strings and return the number of bar codes found. See also: ScanBarcodeFromDIB Photometric Win32 dll declarations: VB.Net: Private Declare Function mtScanBarCodeFromBitmap Lib "SoftekBarcode" (ByVal hBarcode As System.IntPtr, ByVal hBitmap As IntPtr) As Short N/A Bitmap is multi-plane Invalid number of bits per sample Memory allocation error N/A Invalid license key. Handle to an instance of the barcode toolkit (dll only). System.Drawing.Bitmap object handle (HBITMAP) to a bitmap. Object.ScanBarCodeFromBitmap(bitmap) Object.ScanBarCodeFromBitmap(hBitmap) mtScanBarCodeFromBitmap(hBarcode, hBitmap)
54
Visual C++: extern "C" { short __stdcall mtScanBarCodeFromBitmap(HANDLE hBarcode, long hBitmap); }
55
19.17 ScanBarCodeFromDIB
Syntax .net/com/ocx: dll: Parameters hBarcode hDIB Return Value -1 -2 -3 -4 -5 -6,-7,-8 Remarks Scan the specified device independent bitmap for bar code strings and return the number of bar codes found. The image must be single plane. The hDIB parameter is a handle to a memory object which has the same format as a BMP file not including the BITMAPFILEHEADER. Note that the function will stop when the first barcode is found in a document unless the MulipleRead property is set to True. See also ScanBarCodeFromBitmap Win32 dll declarations: VB.Net: Private Declare Function mtScanBarCodeFromDIB Lib "SoftekBarcode" (ByVal hBarcode As System.IntPtr, ByVal hDIB As IntPtr) As Short Visual C++: extern "C" { short __stdcall mtScanBarCodeFromDIB(HANDLE hBarcode, long hDIB); } N/A DIB is multi-plane Invalid number of bits per sample Memory allocation error N/A Invalid license key. Handle to an instance of the barcode toolkit (dll only). Memory object see Remarks below. Object.ScanBarCodeFromDIB(hDIB) mtScanBarCodeFromDIB(hBarcode, hDIB)
56
19.18 SetScanRect
Syntax .net/com/java/ocx: dll: Parameters hBarcode tlx tly brx bry mode Return Value 1/True on success and 0/False on failure. Remarks SetScanRect specifies the bounding rectangle in the image that should be searched for barcodes. To clear the rectangle and search the entire image set the rectangle to (-1, -1, -1, -1). The top left hand corner of an image is (0,0). The mapping mode can have the following values: 0 = All measurements are in pixels. 1 = All measurements are a percentage of the width or height of the image. Win32 dll declarations: VB.Net: Private Declare Function mtSetScanRect Lib "SoftekBarcode" (ByVal hBarcode As System.IntPtr, ByVal TopLeftX As Integer, ByVal TopLeftY As Integer, ByVal BottomRightX As Integer, ByVal BottomRightY As Integer, ByVal MappingMode As Short) As Boolean Visual C++: extern "C" { BOOL __stdcall mtSetScanRect(HANDLE hBarcode, long TopLeftX, long TopLeftY, long BottomRightX, long BottomRightY, short MappingMode); } Handle to an instance of the barcode toolkit (dll only). x coordinate of top left hand corner y coordinate of top left hand corner x coordinate of bottom right hand corner y coordinate of bottom right hand corner mapping mode (see below) SetScanRect(tlx, tly, brx, bry, mode) mtSetScanRect(hBarcode, tlx, tly, brx, bry, mode)
57
handle final character of code 25 barcode as checksum handle final character of code 39 barcode as checksum expect start/stop characters with code 39 barcodes divide scan lines into sections for threshold levels
control the time spent processing a color image set the color threshold level for a color image automatically convert UPC-E format to EAN-13
ColorChunks (*)
ColorProcessingLevel ColorThreshold ConvertUPCEToEAN13 DatabarOptions Despeckle Encoding ErrorCorrection ExtendedCode39 FilePathEncoding GammaCorrection LicenseKey LineJump MaxLength MedianFilter MinLength MinOccurrence MinSeparation MinSpaceBarWidth
58
scan for more than one barcode perform noise reduction before scanning set the page number to scan in a muli-page image minimum score for a Patch Code barcode.
only report barcodes that fit the specified pattern enable debug mode for PDF-417 barcodes
load pdf documents at specified bits-per-pixel load pdf documents at specified dots-per-inch mask to control how images are extracted from pdf files PDF documents will only contain images mask to control how pdf files are rasterized set photometric interpretation for bi-tonal bitmaps specify the preferred score for a barcode set the size of the quiet zone around a barcode scan for codabar barcodes scan for code-128 barcodes scan for code-25 barcodes scan for non-interleaved code-25 barcodes scan for code-39 barcodes scan for code-93 barcodes
Pdf417Debug (*)
PdfBpp PdfDpi PdfImageExtractOptions PdfImageOnly PdfImageRasterOptions Photometric PrefOccurrence QuietZoneSize ReadCodabar ReadCode128 ReadCode25 ReadCode25ni ReadCode39 ReadCode93 ReadDatabar ReadDataMatrix ReadEAN13 ReadEAN8 ReadMicroPDF417 ReadNumeric ReadPatchCodes
59
ReadPDF417 ReadQRCode ReadShortCode128 ReadUPCA ReadUPCE ScanDirection ShortCode128MinLength ShowCodabarStartStop (*) ShowCheckDigit SkewLineJump SkewTolerance TifSplitMode TifSplitPath
scan for pdf-417 barcodes scan for QR-codes. scan for short code-128 barcodes scan for upc-a barcodes scan for upc-e barcodes
specify the output path for splitting tif and pdf documents
(*) indicates an advanced parameter than can only be set using LoadXMLSettings.
60
Setting a property value using the ocx interface: Object.SetPropertyName(Value) Getting a property value using the ocx interface: Value = Object.GetPropertyName()
Setting a property value using the dll interface: mtSetPropertyName(hBarcode, Value) Getting a property value using the ocx interface: Value = mtGetPropertyName(hBarcode)
Win32 dll declarations: If the property is of type BOOL: VB.Net: Private Declare Function mtGetPropertyName Lib "SoftekBarcode" (ByVal hBarcode As System.IntPtr) As Boolean Private Declare Function mtSetPropertyName Lib "SoftekBarcode" (ByVal hBarcode As System.IntPtr , ByVal newValue As Boolean) As Boolean
Visual C++: extern "C" { BOOL __stdcall mtGetPropertyName (HANDLE hBarcode); BOOL __stdcall mtSetPropertyName (HANDLE hBarcode , BOOL bNewValue); } If the property is of type SHORT: 61
VB.Net: Private Declare Function mtGetPropertyName Lib "SoftekBarcode" (ByVal hBarcode As System.IntPtr) As Short Private Declare Function mtSetPropertyName Lib "SoftekBarcode" (ByVal hBarcode As System.IntPtr , ByVal newValue As Short) As Short
Visual C++: extern "C" { short __stdcall mtGetPropertyName (HANDLE hBarcode); short __stdcall mtSetPropertyName (HANDLE hBarcode , short bNewValue); } If the property is of type STRING: VB.Net: Private Declare Function mtGetPropertyName Lib "SoftekBarcode" (ByVal hBarcode As System.IntPtr) As String Private Declare Function mtSetPropertyName Lib "SoftekBarcode" (ByVal hBarcode As System.IntPtr , ByVal newValue As String) As String
Visual C++: extern "C" { LPCSTR __stdcall mtGetPropertyName (HANDLE hBarcode); LPCSTR __stdcall mtSetPropertyName (HANDLE hBarcode , LPCSTR bNewValue); }
20.2 AllowDuplicateValues
Overview The AllowDuplicateValues can be used to stop the toolkit from reporting duplicate barcodes on the same page in an image. This can be useful for images where the middle section of a barcode is badly damaged or missing. With the property set to TRUE the toolkit may report that there are 2 barcodes of the same type and value. With the property set to FALSE it would assume that the 2 barcodes were part of a single barcode and set the bounding rectangle accordingly. Type: BOOL Default value: TRUE See also: Setting and Getting Property Values MinSeparation
20.3 BitmapResolution
Overview 62
BitmapResolution is the resolution of the bitmap to be scanned in ScanBarCodeFromBitmap, in dots per inch. This value only effects the expected size of the quiet area around a barcode and for most images can be left to the default value. Type: SHORT Default value: 200 See also: Setting and Getting Property Values
20.4 CodabarMaxVariance
Overview CodabarMaxVariance is the maximum percentage variance that a character in a codabar barcode can have from the average for that barcode. Type: SHORT Default value: 20 Note: This is an Advanced property and can only be set using LoadXMLSettings See also: ReadCodabar
20.5 Code25Checksum
Overview When True the toolkit will only report Code 25 barcodes where the last character is a valid checksum for the rest of the barcode. The toolkit expects a Code 25 checksum to be calculated using the following method:
Sum all of the even positioned characters (the right hand message character is always even), and multiply by 3. Sum all the odd positioned characters. Sum the totals from steps 1 and 2. The checksum is the smallest number that when added to this sum results in a multiple of 10. If the resulting number of characters is odd and you are using Interleaved Code 2 of 5 then add a leading 0 to the message data. Type: BOOL Default value: FALSE
See also: Setting and Getting Property Values 63
ReadCode25
20.6 Code39Checksum
Overview
When True the toolkit will only report Code 39 barcodes where the last character is a valid checksum for the rest of the barcode. The toolkit expects a Code 39 checksum to be calculated using modulus-43. The following table shows the character and value used for the calculation...
Char 0 1 2 3 4 5 6 7 8 9 A
Value 0 1 2 3 4 5 6 7 8 9 10
Char B C D E F G H I J K L
Value 11 12 13 14 15 16 17 18 19 20 21
Char M N O P Q R S T U V W
Value 22 23 24 25 26 27 28 29 30 31 32
Char X Y Z . space $ / + %
Value 33 34 35 36 37 38 39 40 41 42
e.g Data = 12345ABCDE+ Sum of values: 1 + 2 + 3 + 4 + 5 + 10 + 11 + 12 + 13 + 14 + 41 = 116 115 / 43 = 2 rem 30, so U is the check digit. Data and check digit = 12345ABCDE+U
64
20.7 Code39NeedStartStop
Overview
When set to TRUE the toolkit will only report Code 39 barcodes that start and end with a * character. Setting this property to FALSE is not recommended for the following reasons: It is not a valid Code 39 barcode without the start and stop * character. Without a start/stop * character, a Code 39 barcode reads with 2 different values, left to right, and right to left. The toolkit will report it as 2 different barcodes unless the scan direction is restricted to one direction only. The probablility of a false positive reading is increased significantly by setting this property to FALSE. Type: BOOL Default value: TRUE
See also: Setting and Getting Property Values
20.8 ColorChunks
Overview ColorChunks specifies how many sections a scan line of an image should be broken into when calculating threshold levels for black and white pixels. Type: SHORT Default value: 1 Note: This is an Advanced property and can only be set using LoadXMLSettings See also: ColorProcessingLevel
20.9 ColorProcessingLevel
Overview
65
The ColorProcessingLevel property controls the amount of processing time spent reading barcode values from color images. Values range from 0 to 5, with a default of 2. A low value will process color images faster but accuracy and read-rate levels will be lower than if a high value is used. Please note that setting the ColorThreshold property to a non-zero value effectively sets ColorProcessingLevel to 0. Type: SHORT Default value: 2 See also: Setting and Getting Property Values ColorChunks ColorThreshold
20.10 ColorThreshold
Overview ColorThreshold is the color value used by the control to decide whether a pixel should be considered to be black or white. The value should be in the range 0 to 255. Please note that if this property is set to a non-zero value than ColorProcessingLevel is effectively set to a value of 0. It is recommended to set this property to 0 and control the accuracy of reading from color images through the ColorProcessingLevel property.
Type: SHORT Default value: 0 See also: Setting and Getting Property Values ColorProcessingLevel
20.11 ConvertUPCEToEAN13
Overview A UPC-E barcode is actually an EAN-13/UPC-A barcode that has had certain digits removed to create an 8 digit number. Only certain EAN-13/UPC-A barcodes can go through this process. For example, the UPC-A barcode "023456000073 " can be suppressed to the UPC-E value "02345673" and restored to it's original value by the barcode reader. The Softek barcode Reader SDK can interpret a UPC-E barcode in either format via the ConvertUPCEToEAN13 property. When set to TRUE the toolkit will convert type UPC-E barcodes into EAN-13 format. Type: BOOL Default value: TRUE 66
See also:
20.12 DatabarOptions Overview The DatabarOptions property can be used to set various options for GS1 Databar recognition. All options are turned on by default, but some applications may find it useful to disable certain features for performance reasons. The property works as a mask and can be constructed from the following values: 1 2 4 8 16 32 Read the supplementary 2-D portion if indicated by the linkage flag. Read RSS-14 barcodes Read RSS-14 Stacked barcodes Read RSS-Limited barcodes Read RSS-Expanded barcodes Read RSS-Expanded Stacked barcodes
20.13 Despeckle
Overview If the Despeckle property is set to TRUE and the NoiseReduction property is none zero, then the toolkit removes white speckles inside the bars of a barcode before removing black marks from the spaces between bars. Type: BOOL Default value: FALSE See also: Setting and Getting Property Values 67
NoiseReduction
20.14 Encoding
Overview The Encoding property controls the format in which the toolkit returns strings for barcode types that use full symbol sets such as PDF-417. The property can take any of the following values: 0 1 2 3 Raw , with null characters suppressed. Quoted printable Unicode UTF-8
Type: SHORT Default Value: 0 See also: Setting and Getting Property Values
20.15 ErrorCorrection
Overview Some barcodes cannot be read because the process of scanning or faxing has split or merged bars together. When ErrorCorrection is set to True to toolkit will, where possible, make a best guess at such barcodes. Note that this property currently only applies to Code 39 and Code 39 Extended barcodes. Type: BOOL Default value: FALSE See also: Setting and Getting Property Values ReadCode39
20.16 ExtendedCode39
Overview A Code 39 barcode can be used to represent the entire ASCII-128 symbol set by using 2 normal Code 39 characters to represent one character in the ASCII-128 symbol set. A barcode reader cannot distinguish between normal and extended Code 39 barcodes and so the ExtendedCode39 property 68
must be set to TRUE when reading barcodes encoded using the extended symbol set. Note that the ReadCode39 property must also be set to TRUE. If the toolkit is unable to decode the string in the extended symbol set then it is left as a normal Code 39 barcode. Type: BOOL Default value: FALSE See also: Setting and Getting Property Values ReadCode39
20.17 FilePathEncoding
Overview FilePathEncoding specifies how file paths are encoded when passed to the win32 DLL interface. A value of 0 indicates ASCII encoding and 1 indicates UTF-8 encoding. Wrapper interfaces such as Java and SoftekBarcodeLib3.dll set this property to 1 by default where as the default for the win32 DLL is 0. Type: SHORT Default value: (see above) Note: This is an Advanced property and can only be set using LoadXMLSettings
20.18 GammaCorrection
Overview If GammaCorrection is set to a value other than 100 then the toolkit will apply gamma correction to a color image. The amount of gamma correction is equal to GammaCorrection / 100. For example, to achieve a gamma correction of 0.5 the property should be set to a value of 50. Type: SHORT Default value: 100 See also: Setting and Getting Property Values
20.19 LicenseKey
Overview Use the LicenseKey property to set your license key prior to calling the ScanBarCode, ScanBarCodeFromBitmap or ScanBarCodeFromDIB functions. With no license key the .net interface will return all barcode values as Please contact [email protected] for a trial license string" and other interfaces will display a pop up box that the user will need to click on to continue.
69
Type: STRING Default value: See also: Setting and Getting Property Values
20.20 LineJump
Overview The LineJump property controls the frequency with which the toolkit samples scan lines as it moves through an image. Increasing the value of the LineJump property will increase the speed at which an image is processed but may decrease the read rate. The SkewLineJump property is used in a similar way when searching for skewed barcodes. Type: SHORT Default value: 1 See also: Setting and Getting Property Values SkewLineJump
20.21 MaxLength
Overview MaxLength defines the largest length for a barcode string, including checksum characters. Type: SHORT Default value: 999 See also: Setting and Getting Property Values MinLength
20.22 MedianFilter
Overview When TRUE the toolkit will apply a median filter to the image before checking for barcodes. This is a useful option for high resolution images that contain speckles of black and white. It is not recommended for images where the black bars or white spaces are less than 2 pixels wide. Type: BOOL Default Value: FALSE See also: Setting and Getting Property Values
70
20.23 MinLength
Overview MinLength defines the smallest length for a barcode string, including checksum characters. Type: SHORT Default value: 4 See also: Setting and Getting Property Values MaxLength
20.24 MinOccurrence
Overview Please refer to PrefOccurrence for more information. Type: SHORT Default value: 2 See also: Setting and Getting Property Values
20.25 MinSeparation
Overview MinSeparation defines the minimum distance between barcodes of identical value and vertical alignment in 1/300th of an inch. If the distance between two barcodes of same value and on the same alignment is less than MinSeparation then the toolkit assumes that it is a single barcode that has been split into 2 parts by a problem in the scanning process. Type: SHORT Default value: 180 See also: Setting and Getting Property Values
20.26 MinSpaceBarWidth
Overview MinSpaceBarWidth is the minimum acceptable size for a space between the bars in a barcode. When set to a value of 0 the toolkit will automatically select the best value. Spaces that are smaller than the value used are ignored. Type: SHORT Default value: 0 See also: Setting and Getting Property Values
71
20.27 MultipleRead
Overview Normally the toolkit stops at the first positive match for a barcode. When MultipleRead is TRUE the toolkit will check the entire image for barcode strings and record each positive match. Type: BOOL Default value: FALSE See also: Setting and Getting Property Values
20.28 NoiseReduction
Overview If the NoiseReduction property is none zero then the toolkit will run an image through a noise reduction filter before scanning for barcodes. The filter removes marks from an image that are unlikely to be part of a barcode. A larger value for NoiseReduction will remove larger marks from the image, but may also destroy vital barcode information. A typical value for NoiseReduction is 10. Type: SHORT Default value: 0 See also: Setting and Getting Property Values Despeckle
20.29 PageNo
Overview PageNo is a 1 based index that specifies the page to be scanned in an image. A value of zero indicates that every page will be scanned Type: SHORT Default value: 0 See also: Setting and Getting Property Values
20.30 PatchCodeMinOccurrence
Overview Please refer to PrefOccurrence for more information.
72
Type: SHORT Default value: 30 Note: This is an Advanced property and can only be set using LoadXMLSettings
20.31 Pattern Overview The Pattern property is a regular expression that each barcode found in an image is compared against. The toolkit will only return barcodes that match the pattern. The toolkit use POSIX extended regular expression syntax. Examples: "ABCDEF" will match all barcodes containing "ABCDEF" (e.g "XYZABCDEFXYZ") . "ABC[0-9]+" will match all barcodes containing "ABC" followed by one or more digits (e.g XYZABC71827XYZ"). "^ABC[0-9]+$" will match barcodes that only consist of "ABC" followed by one or more digits (e.g "ABC12345"). Note that if a Code 39 barcode uses a checksum character and the Pattern property is used to specify the entire string (ie. the last character of the pattern is $) then the Code39Checksum property must also be set to True. Type: STRING Default value: NULL
See also: Setting and Getting Property Values ReadNumeric
20.32 Pdf417Debug
Overview Output information about the structure and cluster values of the barcode. The debug information is returned in place of the normal barcode value (see GetBarString). The fields of the string are as follows: Error correction status true or false Number of data columns Number of rows 73
Error correction level Number of unknown cluster values And for each cluster: cluster value (score) Type: BOOL Default value: FALSE Note: This is an Advanced property and can only be set using LoadXMLSettings
20.33 PdfBpp
Overview PdfBpp is the number of bits-per-pixel to be used when converting a pdf file into image format, before scanning for a barcode. The value should be 1, 8 or 24. Has no effect when PdfImageOnly is set to True. Type: SHORT Default value: 8 See also: Setting and Getting Property Values PdfDpi PdfImageOnly
20.34 PdfDpi
Overview PdfDpi is the number of dots-per-inch to be used when converting a pdf file into image format, before scanning for a barcode. Has no effect when PdfImageOnly is set to True. Type: SHORT Default value: 300 See also: Setting and Getting Property Values PdfBpp PdfImageOnly
20.35 PdfImageExtractOptions
Overview PdfImageExtractOptions is a mask that controls the way in which images are extracted from PDF documents when PdfImageOnly is set to TRUE. 74
The values for the mask are as follows: 1 2 4 8 Enable fast extraction Auto-invert black and white images Auto-merge strips Auto-correct photometric values in black and white images
PDF documents process at around twice the speed when fast extraction is enabled, but it is possible that some black-and-white images will extract with incorrect photometric values (a negative image, even when auto-invert is enabled); to compensate for this the SDK will use the dominant background color to determine the correct value when the auto-correct photometric flag is set. All of the flags are enabled by default. Type: SHORT Default value: 15 Note: This property is an Advanced Property and must be set using LoadXMLSettings See also: PdfImageOnly
20.36 PdfImageOnly
Overview PdfImageOnly indicates that the PDF documents to be processed by the toolkit are images. Image only PDF documents can be processed faster than other types (containing text, vector graphics etc). If the number of images extracted from a PDF document does not match the number of pages in the document then the document is re-processed as if PdfImageOnly was set to false. Type: BOOL Default value: True Note: In some interfaces this property must be set as an Advanced Property using LoadXMLSettings See also: PdfImageExtractOptions Setting and Getting Property Values
20.37 PdfImageRasterOptions
Overview PdfImageRasterOptions is a mask that controls the way in which PDF files are rasterized. Note that this option is only used when PdfImageOnly = false or when image extraction has failed. The values for the mask are as follows:
75
1 Use alternative pdf-to-tif conversion function. 2 Always use pdf-to-tif conversion rather than loading the rasterized image directly into memory. Type: SHORT Default value: 0 Note: This property is an Advanced Property and must be set using LoadXMLSettings See also: PdfImageOnly
20.38 Photometric
Overview The Photometric property determines how the toolkit interprets a pixel value in a bi-tonal bitmap passed to the ScanBarCodeFromBitmap method. Pixel Value = 0 Black White Pixel Value = 1 White Black
Photometric = 0 Photometric = 1
This property is not used with the ScanBarCode or ScanBarCodeFromDIB methods. Type: SHORT Default value: 0 See also: Setting and Getting Property Values ScanBarCodeFromBitmap
20.39 PrefOccurrence
Overview As the SDK scans an image it assigns a score to each barcode candidate. At the end of a scan, any candidates with a score >= PrefOccurrence are reported by the SDK. If no candidate meets this criteria then the SDK selects the candidate with the highest score and reports this barcode if it has a score >= MinOccurrence. Note that Patch Codes are only ever reported if the score is >= PatchCodeMinoccurrence. Type: SHORT Default value: 5 See also: Setting and Getting Property Values
76
MinOccurrence PatchCodeMinOccurrence
20.40 QuietZoneSize
Overview When the toolkit checks for a barcode on a scan line in an image, it ignores those parts of the line that are not preceded by the number of white pixels specified by QuietZoneSize. When the property has a value of 0 then the quiet zone is calculated 1/10th of the value of the image resolution (e.g. 10 pixels in a 100 dpi image). Type: SHORT Default value: 0 See also: Setting and Getting Property Values
20.41 ReadCodabar
Overview When set to TRUE the toolkit will search for codabar barcodes and the string returned by GetBarStringType will be set to CODABAR. Type: BOOL Default value: TRUE See also: Setting and Getting Property Values CodabarMaxVariance
20.42 ReadCode128
Overview When set to TRUE the toolkit will search for type 128 barcodes and the string returned by GetBarStringType will be set to CODE128. Type: BOOL Default value: TRUE See also: Setting and Getting Property Values ReadShortCode128 UseOldCode128Algorithm
77
20.43 ReadCode25
Overview When set to TRUE the toolkit will search for type 2 of 5 interleaved barcodes and the string returned by GetBarStringType will be set to CODE25. Type: BOOL Default value: TRUE See also: Setting and Getting Property Values ReadCode25ni Code25Checksum
20.44 ReadCode25ni
Overview When set to TRUE the toolkit will search for type 2 of 5 non-interleaved barcodes in the following formats: Code 2 of 5 Datalogic Code 2 of 5 Iata1 Code 2 of 5 Iata2 Code 2 of 5 Industrial Code 2 of 5 Interleaved Code 2 of 5 Matrix
The string returned by GetBarStringType will be set to CODE25. Type: BOOL Default value: FALSE See also: Setting and Getting Property Values
20.45 ReadCode39
Overview When set to TRUE the toolkit will search for type 39 barcodes and the string returned by GetBarStringType will be set to CODE39. Type: BOOL Default value: TRUE See also: Setting and Getting Property Values 78
20.46 ReadCode93
Overview When set to TRUE the toolkit will search for type 93 barcodes and the string returned by GetBarStringType will be set to CODE93. Type: BOOL Default value: FALSE Note: In some interfaces this property must be set as an Advanced Property using LoadXMLSettings
20.47 ReadDatabar Overview When set to TRUE the toolkit will search for GS1 Databar barcodes and the string returned by GetBarStringType will be set to DATABAR. The following types of GS1 Databar are supported: RSS-14 RSS-14 Truncated RSS-14 Stacked RSS-14 Stacked Omnidirectional RSS Limited RSS Expanded RSS Expanded Stacked Please note the the bounding rectangle for stacked versions of the barcode currently only includes either the top-most or bottom-most element of the stack. Reading supplementary data Some GS1 Databar barcodes encode supplementary data in the form of a micro-PDF-417 barcode above the linear portion of the barcode. To read the supplementary portion set
79
ReadMicroPDF417 to True and ensure that DatabarOptions includes the option to read supplementary barcodes.
Type: BOOL Default value: FALSE See also: Setting and Getting Property Values
ReadMicroPDF417 DatabarOptions
20.48 ReadDataMatrix
Overview When set to TRUE the toolkit will search for DataMatrix (ECC 200) barcodes and the string returned by GetBarStringType will be set to DATAMATRIX. Type: BOOL Default value: FALSE See also: Setting and Getting Property Values
20.49 ReadEAN13
Overview When set to TRUE the toolkit will search for EAN-13 type barcodes and the string returned by GetBarStringType will be set to EAN13. Type: BOOL Default value: TRUE See also: Setting and Getting Property Values
20.50 ReadEAN8
Overview When set to TRUE the toolkit will search for EAN-8 type barcodes and the string returned by GetBarStringType will be set to EAN8. Type: BOOL Default value: TRUE See also: Setting and Getting Property Values
80
20.51 ReadMicroPDF417
Overview When set to TRUE the toolkit will search for micro-PDF-417 barcodes and the string returned by GetBarStringType will be set to PDF417. Type: BOOL Default value: FALSE See also: Setting and Getting Property Values
20.52 ReadNumeric
Overview When True the toolkit will only report numeric barcodes. Note that this the same as setting the Pattern property to the value "^[0-9]+$". Type: BOOL Default value: FALSE See also: Setting and Getting Property Values
20.53 ReadPatchCodes
Overview When set to TRUE the toolkit will search for patch code barcodes and the string returned by GetBarString will be set to PATCH. Type: BOOL Default value: FALSE See also: Setting and Getting Property Values
20.54 ReadPDF417
Overview When set to TRUE the toolkit will search for PDF-417 barcodes and the string returned by GetBarString will be set to PDF417. Type: BOOL Default value: FALSE See also: Setting and Getting Property Values 81
20.55 ReadQRCode
Overview When set to TRUE the toolkit will search for QR-Codes and the string returned by GetBarString will be set to QRCODE. All version sizes are supported, however best results will always be obtained when using smaller version sizes with maximum error correction. The Kanji symbol set is not currently supported. Skewed QR-Codes can be read using the default value for SkewTolerance. Changing the value of SkewTolerance will have no effect on the scanning of QR-Codes. For best results set ColorProcessingLevel to a value of 1. GetBarStringDirection will always return a value of 1 for QR-Codes. If only QR-Codes need to be recognized then set ScanDirection to a value of 1.
Type: BOOL Default value: FALSE See also: Setting and Getting Property Values
20.56 ReadShortCode128
Overview When set to TRUE the toolkit will search for Code 128 barcodes of symbol set C, without the normal start and stop characters. The barcode type for these barcodes is set to "SHORTCODE128". Type: BOOL Default value: FALSE See also: Setting and Getting Property Values
20.57 ReadUPCA
Overview When set to TRUE the toolkit will search for UPC-A type barcodes. UPC-A barcodes are a subset of EAN-13. For example, the UPC-A barcode "016000336100" is the same as the EAN-13 barcode "0016000336100". In fact, UPC-A barcodes are the sub-set of EAN-13 barcodes that start with a 0. The ReadEAN13 property controls whether any barcodes of type EAN13 are recognized - and this includes UPC-A, whether or not ReadUPCA is set to true. The effect of the ReadUPCA flag is to control whether an EAN-13 barcode that starts with a 0 is returned as a 12 digit UPC-A or as a 13 digit EAN-13 barcode. The string returned by GetBarString will be set to either UPCA or EAN13.
82
Type: BOOL Default value: FALSE See also: Setting and Getting Property Values
20.58 ReadUPCE
Overview When set to TRUE the toolkit will search for UPC-E type barcodes. A UPC-E barcode is actually an EAN-13/UPC-A barcode that has had certain digits removed to create an 8 digit number. Only certain EAN-13/UPC-A barcodes can go through this process. For example, the UPC-A barcode "023456000073" can be suppressed to the UPC-E value "02345673" and restored to its original value by the barcode reader. The Softek barcode Reader SDK can interpret a UPC-E barcode in either format via the ConvertUPCEToEAN13 property. The string returned by GetBarStringType will be set to UPCE. Type: BOOL Default value: FALSE See also: Setting and Getting Property Values
20.59 ScanDirection Overview ScanDirection is a mask that controls the directions in which the barcode reader will look for barcodes in an image, and is built from the following values: 1 = Left to Right 2 = Top to Bottom 4 = Right To Left 8 = Bottom to Top For example, a value of 5 (1 + 4) means that the reader will look for barcode from left to right and right to left. Note: This property replaces the Rotation property used in previous versions.
Type: SHORT Default value: 15 See also: Setting and Getting Property Values 83
20.60 ShortCode128MinLength
Overview ShortCode128MinLength defines the smallest length for a barcode string, including checksum characters. Type: SHORT Default value: 2 See also: Setting and Getting Property Values
20.61 ShowCodabarStartStop
Overview Include the start and stop characters when returning the value of a codabar barcode. Type: BOOL Default value: TRUE Note: This is an Advanced property and can only be set using LoadXMLSettings
20.62 ShowCheckDigit
Overview When set to TRUE the OCX will include the barcode check digit in the returned string. Note: This property only applies to barcode types with built in check digits (e.g Code 128). Type: BOOL Default value: FALSE See also: Setting and Getting Property Values
20.63 SkewLineJump
Overview SkewLineJump works in a similar way to the LineJump property, but only effects the phase of the scanning process concerned with searching for skewed barcodes. It can be useful to set the 2 properties to different values for reasons of performance. Type: SHORT Default value: 9 84
20.64 SkewTolerance Overview SkewTolerance controls the maximum angle from the horizontal or vertical at which a barcode will be recognised by the toolkit. The table below shows the possible values for this property along with the approximate maximum angles: 0 = up to 5 degrees 1 = 13 degrees 2 = 21 degrees 3 = 29 degrees 4 = 37 degrees 5 = 45 degrees
Type: SHORT Default value: 0 See also: Setting and Getting Property Values
20.65 TifSplitMode
Overview TifSplitMode controls the way in which multi-page TIF files are split into sub-files when the TifSplitPath property is set. A value of 0 means that the sub-files will each start on a page with a bar code (or page 1). A value of 1 means that each sub-file will terminate on a page with a barcode (or the last page) and a value of 2 means that each sub-file consists of the pages between (but not including) the barcodes. For example, a 6 page TIF file with barcodes on pages 2 and 5 will split as follows: TifSplitMode = 0: First sub-file contains page 1. Second sub-file contains pages 2, 3 and 4. Third subfile contains pages 5 and 6. TifSplitMode = 1: First sub-file contains pages 1 and 2. Second sub-file contains pages 3, 4 and 5. Third sub-file contains page 6. TifSplitMode = 2: First sub-file contains page 1. Second sub-file contains pages 3 and 4. Third sub-file contains page 6.
85
Type: SHORT Default value: 0 See also: Setting and Getting Property Values
20.66 TifSplitPath Overview TifSplitPath is the file path template for splitting multi-page TIF files into sub-files in either TIF or PDF format. The template can include the following conversion specifications: %d replaced by a sub-file index number (starting at 1) replaced by the barcode found in the sub-file (modes 0 and 1) or the last barcode found before the sub-file (mode 2). If no relevant barcode is available then an empty string is used.
%s
If the template does not include %d or %s, or %s then a %d is assumed before the file extension. This case also applies if %s is used on it's own and there is no relevant barcode value available. NOTE: The .Net 1 interface cannot output files in PDF format and the .Net 2/3.5 interface requires the PDF Extension to output files in PDF format. The mode for splitting the TIF file is controlled by the TifSplitMode property. e.g c:\tmp\output%d_%s.tif or c:\tmp\output%d_%s.pdf
Type: STRING Default value: NULL See also: Setting and Getting Property Values
20.67 UseOldCode128Algorithm
Overview Use the Code 128 detection algorithm as used in earlier versions of the toolkit (pre version 7.3.1). Type: BOOL Default value: FALSE Note: This is an Advanced property and can only be set using LoadXMLSettings
86
20.68 UseOverSampling
Overview When UseOverSampling is TRUE the barcode reader samples 3 lines at a time (skipping 2 lines between each sample) and takes the average pixel value. This is useful for images containing both black and white speckles. Type: BOOL Default value: FALSE See also: Setting and Getting Property Values
20.69 UseRunCache
Overview Use a memory cache for run-length information derived from an image. Type: BOOL Default value: TRUE Note: This is an Advanced property and can only be set using LoadXMLSettings
20.70 WeightLongerBarcodes
Overview When WeightLongerBarcodes is TRUE the barcode reader will weight the counts used with the PrefOccurrence and MinOccurrence properties according to the length and type of the barcode in question. Barcode types using built in checksums are favoured above barcode types with no checksum. Type: BOOL Default value: TRUE Note: This is an Advanced property and can only be set using LoadXMLSettings
87
88
File x86/bardecode_jni.dll
Win32 DLL
.Net 1
Java
ActiveX/ OCX
COM
Adobe PDF
x86/cimage.dll
x86/convert.dll
x86/encryptpdf.dll
x86/pdf2image.dll
x86/pdf2tif.dll x86/pdf2img.ini
x86/SoftekATL.dll
x86/SoftekBarcode.dll
x86/SoftekBarcode.ocx
x86/SoftekBarcodeLib2.dll
anycpu/SoftekBarcodeLib3.dll
x86/SoftekBarcodeLib.dll
x86/SoftekBarcodePDF.dll
Register with regsvr32. Not compatible with the PDF Extension to the toolkit. Requires install Microsoft Visual C++ 2008 Redistributable Package SP1 for x86 systems Required only if documents are to be split into PDF format.
applications path (and on the reference path for .net applications). The target folder for the x86 files (used to support Adobe PDF documents) can be any folder except the system32 folder (the SysWow64 folder is often used).
File x64/bardecode_jni.dll Win32 DLL .Net 2.0+ Lib2.dll .Net 2.0+ Lib3.dll Java COM Adobe PDF
x64/msvcr90.dll
x64/ pdf2image.dll
x64/pdf2tif.dll
x64/SoftekATL.dll
x64/SoftekBarcode.dll
x64/SoftekBarcodeLib2.dll
anycpu/ SoftekBarcodeLib3.dll
x64/ SoftekBarcodePDF.dll
x86/cimage.dll
x86/convert.dll
x86/encryptpdf.dll
x86/pdf2image.dll
x86/PDF2ImageCOM.exe
x86/pdf2tif.dll
x86/Pdf2tifcom.exe
x86/pdf2img.ini
Where Lib2.dll refers to SoftekBarcodeLib2.dll and Lib3.dll refers to SoftekBarcodeLib3.dll Register with regsvr32. Register by running PDF2ImageCOM.exe /regserver or Pdf2tifcom.exe /regserver Requires install Microsoft Visual C++ 2008 Redistributable Package SP1 for x64 systems Required only if documents are to be split into PDF format.
90
91
92
2. New .net component This version also includes a new interface to the toolkit for .net applications. The SoftekBarcodeLib3.dll component wraps around the SoftekBarcode.dll and can process TIF documents at 3 times the speed of the SoftekBarcodeLib2.dll component. 3. Simplified installation All the files for the SDK are now installed into a single folder by running a self extracting installer. No dll files need to be registered unless the COM or OCX interfaces are to be used and so the new version may be used in isolation to previous versions of the toolkit. The install set also includes the dll files for the PDF Extension, with the license key determining whether or not barcode can be read from PDF documents. 4. PDF Processing Image only PDF documents can now be processed at up to 3X the speed of previous versions. When the PdfImageOnly property is set to True (the default value) the toolkit will assume that all PDF documents are image only (e.g, scanned documents) and use a faster conversion method than would be needed for other types of PDF document. 5. PDF Processing on x64 Systems This version has resolved a number of issues with processing PDF documents on x64 based systems. 6. Replacement of ImageReader and DeveloperCenter with SoftekSDKDemo The demonstration applications used in previous versions of the toolkit have been replaced with the SoftekSDKDemo application, which comes in versions for both x86 and x64 based systems. 7. Improvements to barcode recognition Improvements have been made to the Code 39, Code 128, GS1-Databar and Datamatrix modules. 8. Code 93 Support Support for Code 93 barcodes has also been added. Please refer to the manual page for further details. 9. TIF Resolution If a TIF document uses a resolution of 1 dpi then the value will be ignored and a default value of 200 dpi used instead. 10. DLL Dependencies The only DLL file that requires installation of the Microsoft Visual C++ Redistributable Package (2008 SP1) is SoftekbarcodeLib2.dll. 22.5.2 Version 7.4.1.2 A PInvoke error when using the SoftekBarcodeLib3.dll under .Net 4 has been fixed. 93
22.5.3 Version 7.4.1.3 The SetScanRect method in SoftekBarcodeLib3.dll now functions correctly. Options for extracting images from PDF documents can now be controlled through the PdfImageExtractOptions advanced property. A typing error in the product names for the redistribution packages has been corrected. 22.5.4 Version 7.4.1.4 The LicenseKey property added to Java class An error in the PDF-417 decode algorithm has been corrected. The datamatrix module has been changed to better handle the effects of perspective in a photograph. A correction has been made to the way BMP files are loaded by the win32 dll. 22.5.5 Version 7.4.1.5 PdfImageRasterOptions mask property added to allow control over rasterization of PDF documents. Options dialog in SoftekSDKDemo has been split into tabs. 22.5.6 Version 7.4.1.6 Updated versions of pdf2tif.dll, convert.dll and encrypt.dll added to the install set 22.5.7 Version 7.4.1.7 Added FilePathEncoding property. Support for file paths containing non-ascii characters has been improved.
The compression used when outputting PDF documents as part of the Tiff Split process has been changed from zip to jpeg, which yields significantly smaller files. 5. Java Interface The properties; ReadMicroPDF417, ReadDatabar and ReadDataMatrix have been added to the java interface. 6. SkewTolerance Range Range checks have been added for the value of the SkewTolerance property. 7. SoftekBarcodeLib2.ScanBarCodeFromBitmap empty string problem It was possible for the ScanBarCodeFromBitmap method in the .net 2 interface to return a value of 1, and yet GetBarString would return an empty string. This has been fixed and the barcode value is now returned. 8. Median Filter memory leak A memory leak has been fixed when MedianFiler is set to True. 9. Double read on skewed DataMatrix barcodes. An error whereby it was possible to get a double read for slightly skewed datamatrix barcodes has been fixed.
10. Empty values for Datamatrix An error whereby the toolkit returned empty datamatrix barcode values for some images has been fixed.
95
5. Output of split files in PDF Format A potential memory exception has been fixed when export TIF split pages in PDF format. 6. Reading non-TIF files from URL's A bug which meant that the toolkit always assumed a file read from a URL was in TIF format has been fixed.
96
In previous versions it was possible to get partial reads of barcode such as Code 2 of 5 when using SkewSetting values > 0. This version detects and removes such errors. 4. Encoding property added to control format in which barcodes are returned: 0 (default) = raw (with null characters suppressed) 1 = Quoted printable 2 = Unicode 3 = UTF-8 Note that this property mainly applies to PDF-417 barcodes. 5. Sorting of barcode results Previous versions of the toolkit have generally returned barcodes ordered bottom up and left to right - with some exceptions. This version now checks the ordering to ensure that barcodes are returned in the expected order. 6. Bug fix in SaveResults method in the .net 2.0 component. In previous versions this function only saved the results for the last page in a multi-page TIF document. 7. The properties PdfBpp, PdfDpi, PageNo and Photometric can be exported and imported using the XML interface. 8. Added support for micro-PDF-417 barcodes via the ReadMicroPDF417 property. 9. Added support for Short Code 128 barcodes via the ReadShortCode128 property. Another property called ShortCode128MinLength has also been added to control the minimum allowed length for this type of barcode. The default value is 2. 10. Improved recognition of long Code 128 and Code 39 barcodes.
97
3. Tiff Split The TiffSplitPath property can now include %s as well as %d. The %s code will be replaced by the value of the barcode in the sub-file. 4. JPG Loading Errors The handling of error conditions when loading a jpg file has been improved.
98
4. Code 25 character width tolerance The allowed variation in width for Code 25 characters in barcodes of more than 6 characters has been increased. 5. Extra wide spaces The toolkit now handles barcodes with an exceptionally high ratio between the first black bar and first white space. 6. Auto Color Threshold Calculation Improved The automatic calculation of the value for color threshold has been imrpoved. 7. PDF-417 Recognition An improvement has been made to the PDF-417 algorithm, which allows it to recognise much lower resolution images than was previously possible. A logic error has also been fixed in the decoding alogorithm for byte compacted data. 8. Code 39 Recognition A small improvement has been made to the Code 39 algorithm to handle barcodes with a low ratio between the wide and narrow bars.
99
If a color bitmap was processed with the NoiseReduction property set to a value great than zero and ScanDirection exclusively portrait or landscape, then a memory leak occurred. The leak has now been fixed.
b. Part of the end pattern is missing. c. The column widths vary through the image. d. The bases of some columns are missing. 3. Code 39 Error Correction/Oversample Bug A buffer over-run which occurred on some images where Code 39 error correction and oversampling had both been set has been fixed.
101
8. Default value of LineJump property has been changed from 9 to 1. 9. Improvement in speed Optimization in the Code 25, Code 39 and Code 128 module has given a significant improvement in speed.
10. Code 39 and Code 25 Recognition The algorithms for Code 39 and Code 25 have been improved to cope better with poor quality barcodes. 11. Memory Leak in the .Net Component A memory leak has been fixed in the .Net component. The memory was leaked each time an instance of the component was destroyed.
104
The Managed Component now provides full multi-page image support. The default for the PageNo property is now zero - which means that all page of an image will be checked for barcodes.
105
Description: BMP files that used a zero bit to represent a white pixel were being displayed in negative by the image viewer and interpretted as a negative image by the barcode reader. Solution: SoftekBarcode.dll has been modified to read the color map correctly. 2. Some BMP files would read OK on Windows 2000 but would fail to read on Windows XP. Description: The bmWidthBytes member of the BITMAP structure is sometimes mis-reported by Windows XP. The value is often rounded up to an integer divisible by 4. This leads to the barcode toolkit loading the image into memory incorrectly and either missing the barcode, getting the poisition wrong or reporting multiple occurrences of a barcode. Solution: The length of the bitmap data is now checked to make sure that it matches the reported size of bmWidthBytes. The fix is in SoftekBarcode.dll. The photometric interpretation on monochrome bitmap files is now checked before processing. Files that represented white with a zero bit were being read as a negative image
107
TifSplitMode BitmapResolution The component uses the .Net class for loading images and so supports a greater range of image types (e.g PNG, GIF) in addition to the usual set. 4. UPC-E to EAN-13 Conversion UPC-E is a zero suppressed version of UPC-A/EAN-13 and the default in version 4 was to restore the suppressed zero's. The option has been added in version 6 to leave the barcode as it is printed, via the ConvertUPCEToEAN13 property. The default value is True - which means that the zero's will be restored (the behaviour in version 4). 5. Retrieve the Direction of a Barcode in an Image A new method has been added to retrieve the orientation of a barcode. The GetBarStringDirection method returns a value that, if used for the ScanDirection property, would detect the barcode. Some barcodes can be read from left to right or right to left. In these cases the direction returned is the first match found. 6. Code39Draw control The Code39Draw control has been fixed so that it prints out the same size as it displays on the screen. 7. 45 degree angle scanning 4 new scan directions are available in the toolkit. The default value for the ScanDirection mask is still set to 15, which covers left-right and top-down directions. Please refer to the manual for full details of the new values for the mask.
108