Introduction

The LEADTOOLS Barcode functions are available as an add-on to the LEADTOOLS 32-bit API. The functions allow you to read barcodes, write barcodes and find duplicate barcodes within an image.

Executable demos are included in all LEADTOOLS products. The executable demos provide a quick and easy way to evaluate features and performance.

Summary of All Supported Image File Formats

Please note that if you have purchased an eval version of a LEADTOOLS toolkit, this help file contains the same information as the help file included in the standard release toolkit. Consequently, references to the .DLL and .LIB files contain an N designation. The .DLL and .LIB files included with the evaluation toolkit contain an E designation. Therefore, any references in the help file to xx14N.DLL or xx_N.LIB files refer to the corresponding xx14E.DLL or xx_E.LIB files. For example, if the help file refers to LTBAR14N.DLL, your corresponding file is LTBAR14E.DLL.


Unlocking Barcode Support

Support for reading and writing Linear barcodes, reading Data Matrix, writing Data Matrix, reading PDF barcodes and writing PDF barcodes must be unlocked individually.

To unlock support for reading and writing Linear barcodes L_UnlockSupport must be called with the L_KEY_BARCODES_1D key found on the BarCode Certificate, which will be e-mailed to you. L_UnlockSupport (L_SUPPORT_BARCODES_1D, L_KEY_BARCODES_1D) tells the package to unlock Linear Barcode support and passes the key for verification.

To unlock support for reading Data Matrix barcodes L_UnlockSupport must be called with the L_KEY_BARCODES_DATAMATRIX_READ found on the BarCode Certificate, which will be e-mailed to you. L_UnlockSupport (L_SUPPORT_BARCODES_DATAMATRIX_READ, L_KEY_BARCODES_DATAMATRIX_READ) tells the package to unlock DATAMATRIX Barcode read support and passes the key for verification.

To unlock support for writing Data Matrix barcodes L_UnlockSupport must be called with the L_KEY_BARCODES_DATAMATRIX_WRITE found on the BarCode Certificate, which will be e-mailed to you. L_UnlockSupport (L_SUPPORT_BARCODES_DATAMATRIX_WRITE, L_KEY_BARCODES_DATAMATRIX_WRITE) tells the package to unlock DATAMATRIX Barcode write support and passes the key for verification.

To unlock support for reading PDF barcodes L_UnlockSupport must be called with the L_KEY_BARCODES_PDF_READ found on the BarCode Certificate, which will be e-mailed to you. L_UnlockSupport (L_SUPPORT_BARCODES_PDF_READ, L_KEY_BARCODES_PDF_READ) tells the package to unlock PDF Barcode read support and passes the key for verification.

To unlock support for writing PDF barcodes L_UnlockSupport must be called with the L_KEY_BARCODES_PDF_WRITE found on the BarCode Certificate, which will be e-mailed to you. L_UnlockSupport (L_SUPPORT_BARCODES_PDF_WRITE, L_KEY_BARCODES_PDF_WRITE) tells the package to unlock PDF Barcode write support and passes the key for verification.


Unlocking Special LEAD Features

LEAD offers a variety of features, such as Document support, Medical support, Vector support, etc., which are only available in certain toolkits and are locked. To use these features you must:

purchase a toolkit that supports the desired feature(s).

print the applicable runtime agreement from the help file. For information on the runtime agreements, go to Topic Selection and click on the LEAD Licensing button.

complete the Transmittal document and fax it and the runtime agreement to LEAD's Licensing Department at 704 – 372 – 3789. (To get a copy of the Transmittal document, you must contact LEAD.)

if prepaid licenses are desired, include the order form with payment information. You can fax this along with the Transmittal form and the runtime agreement. (To get a copy of the order form, you must contact LEAD.)

once we have received the signed agreement, we will send instructions for eliminating the license dialogs and the key(s) necessary for unlocking the appropriate features.

when you have received the instructions and the key(s) call the L_UnlockSupport function with the appropriate key.

For example, if you have purchased the LEADTOOLS Document Imaging toolkit:

print the Document Imaging Agreement (or the Document Imaging with OCR Agreement if you have also purchased the LEADTOOLS OCR Module).

complete the Transmittal document and fax it and the Document Imaging Agreement (or the Document Imaging with OCR Agreement) to LEAD's Licensing Department.

if you want prepaid licenses, print a copy of the order form, fill it out and send the order form and payment information to LEAD.

once we have received the signed Document Imaging Agreement (or Document Imaging with OCR Agreement), we will send the instructions for eliminating the license dialogs and any necessary keys.

when you receive the instructions and the key(s), call L_UnlockSupport (L_SUPPORT_DOCUMENT, "Document Key") to unlock the Document features. Please note that "Document Key" represents the actual key you will receive from LEAD. Also note that if you also purchased the LEADTOOLS OCR Module, the OCR features will have to be unlocked separately, using the appropriate key.

For information on products and the features available in each product, or for information on licensing, refer to Topic Selection.

To determine if a certain feature is locked, call the L_IsSupportLocked .


Example Programs

The following example programs are in separate EXAMPLES subdirectories (such as C:\LEAD14\EXAMPLES\DLL\MFCBAR). The executable files for these examples were compiled with a Document/Medical toolkit. To get Document/Medical capabilities, you must buy a LEADTOOLS Document/Medical product. Otherwise, if you recompile the examples, the resulting executable files will not have the Document/Medical capabilities.

Note:

You can run the example program on your system by clicking the appropriate button in online help. If you try to run an example program that is not on your system, an error message will appear.

MFC Barcode Demo

MFC Barcode Demo is the main example program for BarCode support. It uses pull-down menus to demonstrate most of the LEADTOOLS barCode features in one application.


Using the Barcode Demos

This document describes how to use the basic features of the "LEADTOOLS Barcode Demos".

You will find the following features in the Barcode demos:

1. | The ability to save your image to any output file format supported by LEAD Technologies, Inc.
2. | Support for reading and writing different types of barcodes.
3. | The ability to save the results obtained from reading barcodes into a Log file.
4. | Support for Twain and ISIS scanning
5. | The ability to write different barcodes using different colors.

LEAD also includes two step-by-step tutorials for reading barcodes and writing a barcode using this demo. For more information on these, refer to Reading Barcodes Using the Barcode Demo and Writing Barcodes Using the Barcode Demo.

The barcode demos demonstrate the Barcode toolkit features. They let you read several barcode types from an image, or write barcodes over an image using different options.

Supported Image Formats

The LEADTOOLS Barcode toolkit supports all image file formats supported by LEADTOOLS.

Getting Started with the LEADTOOLS Barcode Demos

To start a LEADTOOLS Barcode Demo, you can do one of the following:

1. | Select "Start" -> "Programs" -> "LEADTOOLS Raster Imaging Pro 14.0" -> "Extensions" -> "Barcode" -> "ActiveX" or "API" or "C++ Class Library" and click on the desired demo, as shown below.
 | Please note that your exact path may vary, depending on the toolkit you have installed.

OR

2.

Double click on one of the .EXE files listed below. These .EXE files can be found in the LEAD/Bin directory, where LEAD represents the directory in which you installed the toolkit.

MFCBar32.exe

ClBar32.exe

VBBar32.exe

OCBar40.exe

Barcode API Demo – Main Window

The following displays the Main Window for the "Barcode ActiveX MFC Demo", the "Barcode API MFC Demo" and the "Barcode Class Lib Demo":

The following displays the Main Window for the "Barcode ActiveX VB Demo" and the "Barcode API Demo":

Menus

The LEADTOOLS Barcode Demo contains the following menus:

File Menu

Edit Menu

Actions Menu

Window Menu

Help Menu

Click on each menu for more detailed information.

File Menu

This menu contains the following items:

New: Creates a new image. This option is available only in the "Barcode API MFC Demo", the "Barcode ActiveX MFC Demo" and the "Barcode Class Lib Demo". The new image is created using the width and height specified in the dialog shown below:

Open: Opens an image in which to find existing barcodes or write new barcodes.

Close: Closes the active child window.

Save As: Saves the active image to a physical file.

TWAIN Select: Selects a TWAIN source using the following dialog:

TWAIN Acquire: Opens the TWAIN source user interface to acquire barcode images.

ISIS Select: Selects an ISIS source using the following dialog:

ISIS Acquire: Opens the ISIS source user interface to acquire barcode images.

Exit: Ends the application.

Edit Menu

This menu contains the following items:

Copy: Copies the active image to the clipboard.

Paste: Pastes the clipboard contents to a new child window.

Actions Menu

This menu contains the following items:

Read: Brings up the Read Options dialog. This dialog is used to set the search criteria used when searching for barcodes in the active window. For more information, please refer to Read Options Dialog.

Write: Brings up the Write options dialog. This dialog is used to set the write criteria used when writing a barcode over the active window. For more information, please refer to Write Options Dialog.

Duplicated Info: Brings up a sub menu for finding the duplicated barcodes in the active window. The following shows the sub menu:

This sub menu contains the following items:

Get First: Brings up the Duplicated Index dialog, shown below. This dialog is used to enter the index for the barcode, for which to find a duplicate.

If the barcode toolkit finds a duplicated barcode, then the demo will display the information for the duplicated barcode as shown below. Otherwise, the demo will bring up an error.

Get Next: Finds the next duplicated barcode, if one exists. Otherwise, the demo will bring up an error.

The following menu items are available only in the "Barcode API MFC Demo" the "Barcode ActiveX MFC Demo", and the "Barcode Class Lib Demo":

Set Log File: Brings the Set Log File Name dialog. This dialog is used to set the path for the Log File. When barcodes are read, the results are placed in this file. The following shows the dialog:

Open Log File: Opens the Log File. This menu item is enabled only after the setting a log file in using the Set Log File menu item and reading the barcodes. Selecting this menu item displays the Log File, as shown below:

Window Menu

This menu contains the following items:

Close All: Closes all child windows.

Cascade: Arranges all child windows in cascade style.

Tile: Arranges all child windows in Tile style.

Arrange Icons: Arranges all child windows as icons.

Help Menu

This menu contains the following item:

About: Brings up the About BarDemo dialog, shown below.


Reading Barcodes Using the Barcode Demo

Please note that even though these tutorials use the Barcode API MFC demo, you can follow the same basic steps for any of the Barcode demos.

1. | Start the demo by:
 | Selecting "Start" -> "Programs" -> "LEADTOOLS Raster Imaging Pro 14.0" -> "Extensions" -> "Barcode" -> "ActiveX" or "API" or "C++ Class Library" and click on the desired demo, as shown below.
 | Please note that your exact path may vary, depending on the toolkit you have installed.
 | or
 | Double clicking on the MFCBar32.exe file in the LEAD/BIN directory, where LEAD represents the directory in which you installed the LEADTOOLS toolkit. (If you used the default settings when you installed the toolkit, that path would be "C:\Program Files\LEAD Technologies, Inc\LEADTOOLS\Bin".)
2. | In the main window of the Bar Code Demo, select File -> Open.
3. | In the Open dialog, you can either set the path to the LEAD/Images directory in the "File" edit box or browse to this directory using the "Look in" drop box. (Please note that in the LEAD/Images directory mentioned above, "LEAD" represents the directory in which you installed the LEADTOOLS toolkit.) Select the barcode1.tif file and select Open.
4. | In the main window of the Bar Code Demo, select Actions -> Read …. The Bar Code Read Options dialog will appear, as shown below:
5. | Use the settings shown above. Notice that when the "Search All Types" box is checked, the boxes for the individual barcode types are disabled.
6. | Press OK in the Bar Code Read Options dialog.
7. | A "Notice!" message box will appear with information on the number of barcodes found. Click OK.
8. | Next a dialog will appear for each barcode found. Each dialog will display information about the barcode. Click OK on the dialog to display the dialog for the next barcode.


Writing Barcodes Using the Barcode Demo

Please note that even though these tutorials use the Barcode API MFC demo, you can follow the same basic steps for any of the Barcode demos.

1. | Start the demo by:
 | Selecting "Start" -> "Programs" -> "LEADTOOLS Raster Imaging Pro 14.0" -> "Extensions" -> "Barcode" -> "ActiveX" or "API" or "C++ Class Library" and click on the desired demo, as shown below.
 | Please note that your exact path may vary, depending on the toolkit you have installed.
 | or
 | Double clicking on the MFCBar32.exe file in the LEAD/BIN directory, where LEAD represents the directory in which you installed the LEADTOOLS toolkit. (If you used the default settings when you installed the toolkit, that path would be "C:\Program Files\LEAD Technologies, Inc\LEADTOOLS\Bin".)
2. | In the main window of the Bar Code Demo, select File -> Open.
3. | In the Open dialog, you can either set the path to the LEAD/Images directory in the "File" edit box or browse to this directory using the "Look in" drop box. Select the barcode1.tif file and select Open.
4. | In the main window of the Bar Code Demo, select Actions -> Write …. The Bar Code Write Options dialog will appear, as shown below:
5. | Use the settings shown above.
6. | Press OK in the Bar Code Write Options dialog.
7. | The new barcode will appear on the image.


Version History

Current version: | 14.5
Last update: | October 26, 2005

Changes from Version 14 to Version 14.5

Changes from Version 13 to Version 14

Changes from Version 12.1 to Version 13

Changes from Version 12 to Version 12.1

Changes from Version 11.5 to Version 12

Version 11.5


Changes from Version 14 to Version 14.5

Version 14.5 of the LEADTOOLS Barcode API has changed from Version 14 as follows:

LEADTOOLS Barcode API now supports writing QR barcode symbols.

The rest of this topic lists the new functions:

L_BarCodeWriteExt2


Changes from Version 13 to Version 14

Version 14 of the LEADTOOLS Barcode API has changed from Version 13 as follows:

LEADTOOLS Barcode API now supports UNICODE.


Changes from Version 12.1 to Version 13

Version 13 of the LEADTOOLS Barcode API has changed from Version 12.1 as follows:

LEADTOOLS Barcode API now supports the DATA MATRIX type barcodes.

LEADTOOLS Barcode API no longer supports the CODEONE (2D) type barcodes.

L_BarCodeWrite has been replaced in the LEADTOOLS Barcode API with L_BarCodeWriteExt.

LEADTOOLS Barcode API now supports UCCEAND 128 type linear barcodes, read only.

LEADTOOLS Barcode API supports new ulFlags options for the L_BarCodeRead function.


Changes from Version 12 to Version 12.1

Version 12.1 of the LEADTOOLS Barcode API has not changed from Version 12.


Changes from Version 11.5 to Version 12

Version 12 of the LEADTOOLS Barcode API has changed from version 11.5 as follows:

LEADTOOLS Barcode API now provides functions for loading and unloading the Barcode DLLs.

The latest revision of the barcode engine is now supported, including support for color barcodes.

Changed Structures:

The following structure has been changed since version 11.5.

nDupCount has been added to the BARCODEDATA structure. It contains the total number of barcodes that are duplicates of the current barcode.

The rest of this topic lists the new functions:

L_BarCodeExit

L_BarCodeInit


Version 11.5

Version 11.5 is the first version of LEADTOOLS Barcode API.

LEADTOOLS now provides add-on modules for reading and writing bar codes. (11.5) (Add-on to Document/Medical toolkits only)

The rest of this topic lists the new functions in version 11.5.

BarCode (Add-on to Document/Medical toolkits only)

L_BarCodeFree

L_BarCodeGetDuplicated

L_BarCodeGetNextDuplicated

L_BarCodeIsDuplicated

L_BarCodeRead

L_BarCodeWrite

L_BarCodeVersionInfo


Copyright notice

Copyright Notices

©Copyright LEAD Technologies, Inc. 1991-2005. ALL RIGHTS RESERVED

Portions of the PCDLIB32.DLL, PCDLIB.DLL, LFFPX7.DLL, LFKODAK.DLL, EKFPIXJPEG140.DLL, PDC_SDK.DLL, PROFIRE.DLL, DC120V154_32.DLL, LFDCR14N.DLL, DCSPROBACK.DLL, DCSPRO3SLR.DLL, LFDCS14N.DLL, and LFKDC14N.DLL files contain material that is ©Copyright Eastman Kodak Company, 1996-2001. This software is based in part on the work of the Independent JPEG Group.

Portions of the LFCRW14N.DLL, LTCMP14.DLL, CDSDK.reg, CDSDK.dll, CDRAPCLS.dll, czs_ui.dll, deimg.dll, deImg010.dll, deImg110.dll, deImg153.dll, deimg301.dll, deimg401.dll, deImg404.dll, deimg602.dll, Deimg603.dll, DeImgd60.dll, pscAdimg.dll, pscCllct.dll, pscCStUI.dll, pscDcd.dll, pscDevUI.dll, pscDvlp.dll, Pscl2STI.dll, pscll.dll, pscParse.dll, pscSetup.dll, psdkdll.dll, psdkReg.dll, psParse.dll. file contain material that is © Canon, Inc. 2002

Portions of the LFFPX7.DLL and LFKODAK.DLL files contain material that is ©Copyright Hewlett Packard, 1996.

Portions of the OCR/ICR/OMR Features and the help file for the OCR/ICR/OMR Features are ©Copyright Scansoft, Inc. 1995-2003. ALL RIGHTS RESERVED

Portions of the Barcode Modules contain material that is ©Copyright Axtel Inc., 1999.

Portions of the LEADTOOLS PDF Plug in and the LEADTOOLS Vector Imaging Pro are ©Copyright 1996, 2000 Artifex Software Inc. All rights reserved.

File filters for decoding MrSID ® and DjVu ® formats are provided under a license from Lizardtech, Inc.

The "FlashPix" format uses Microsoft's OLE structured storage.

Portions of the DICOM help files in Medical Imaging product line are reprinted with permission from the National Electrical Manufacturers Association ©Copyright 1998 by the National Electrical Manufacturers Association. All rights including translation into other languages, reserved under the Universal Copyright Convention, the Berne Convention or the Protection of Literacy and Artistic Works, and the International and Pan American Copyright Conventions.

Portions of LEADTOOLS Data Security Add On contain software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/), including cryptographic software written by Eric Young (eay@cryptsoft.com) and by Tim Hudson (tjh@cryptsoft.com). Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) All rights reserved. Copyright Tim Hudson 1995-1998 (tjh@cryptsoft.com) All rights reserved.

Portions of LEADTOOLS Data Security Add On contain software based on the MD5 Message Digest Algorithm developed by RSA Data Security, Inc.. Copyright (c) 1991-92 RSA Data Security, Inc. All Rights Reserved.

Portions hereof licensed under US patent 5,327,254 and foreign counterparts.

Portions of the LEADTOOLS ICC Profiles material is © Copyright 2004, International Color Consortium.

Trademarks

LEAD® and LEADTOOLS® are registered trademarks of LEAD Technologies, Inc.
Microsoft, Windows, Windows NT, Visual Basic, Visual FoxPro, and Microsoft Access are either trademarks or registered trademarks of the Microsoft Corporation.
OS/2® is a registered trademark of International Business Machines Corporation.

TextBridge®OCR is a registered trademark of Scansoft, Inc.

ISIS® is a registered trademark of Pixel Translations, Inc.

ScanAhead™ is a trademark of Pixel Translations, Inc.

FlashPix™ is a trademark of Eastman Kodak Company.

All other brand or product names used in this online help are trademarks of their respective holders.

Address and Contact Information

LEAD Technologies, Inc.
Suite 400
1201 Greenwood Cliff
Charlotte, NC 28204

(704) 332-5532
FAX: (704) 372-8161
E-mail: support@leadtools.com
Technical support: (704) 372-9681 or support@leadtools.com
Home page: http://www.leadtools.com


Programming with LEADTOOLS Barcode

LEADTOOLS supports the reading and writing of several major types of barcodes using the AxtelÓ engine. These types are:

Linear barcodes (1D)

PDF417 (2D)

Data Matrix (2D)

QR

For each major type of barcode, one or more subtypes are supported for both reading and writing. These subtypes are:

Linear Barcodes

EAN 13

EAN 8

UPC A

Code 3 of 9

Code 128

Interleaved 2 of 5

CODABAR

UCCEAN 128

PDF Barcodes

PDF417

Data Matrix

BARCODE_DM_DEF

BARCODE_DM_10x10

BARCODE_DM_12x12

BARCODE_DM_14x14

BARCODE_DM_16x16

BARCODE_DM_18x18

BARCODE_DM_20x20

BARCODE_DM_22x22

BARCODE_DM_24x24

BARCODE_DM_26x26

BARCODE_DM_32x32

BARCODE_DM_36x36

BARCODE_DM_40x40

BARCODE_DM_44x44

BARCODE_DM_48x48

BARCODE_DM_52x52

BARCODE_DM_64x64

BARCODE_DM_72x72

BARCODE_DM_80x80

BARCODE_DM_88x88

BARCODE_DM_96x96

BARCODE_DM_104x104

BARCODE_DM_120x120

BARCODE_DM_132x132

BARCODE_DM_144x144

BARCODE_DM_8x18

BARCODE_DM_8x32

BARCODE_DM_12x26

BARCODE_DM_12x36

BARCODE_DM_16x36

BARCODE_DM_16x48

BARCODE_DM_WRITE_RECTANGLE

QR

BARCODE_QR_DEF

BARCODE_QR_M2_1

BARCODE_QR_M2_2

BARCODE_QR_M2_3

BARCODE_QR_M2_4

BARCODE_QR_M2_5

BARCODE_QR_M2_6

BARCODE_QR_M2_7

BARCODE_QR_M2_8

BARCODE_QR_M2_9

BARCODE_QR_M2_10

BARCODE_QR_M2_11

BARCODE_QR_M2_12

BARCODE_QR_M2_13

BARCODE_QR_M2_14

BARCODE_QR_M2_15

BARCODE_QR_M2_16

BARCODE_QR_M2_17

BARCODE_QR_M2_18

BARCODE_QR_M2_19

BARCODE_QR_M2_20

BARCODE_QR_M2_21

BARCODE_QR_M2_22

BARCODE_QR_M2_23

BARCODE_QR_M2_24

BARCODE_QR_M2_25

BARCODE_QR_M2_26

BARCODE_QR_M2_27

BARCODE_QR_M2_28

BARCODE_QR_M2_29

BARCODE_QR_M2_30

BARCODE_QR_M2_31

BARCODE_QR_M2_32

BARCODE_QR_M2_33

BARCODE_QR_M2_34

BARCODE_QR_M2_35

BARCODE_QR_M2_36

BARCODE_QR_M2_37

BARCODE_QR_M2_38

BARCODE_QR_M2_39

BARCODE_QR_M2_40

BARCODE_QR_M1_1

BARCODE_QR_M1_2

BARCODE_QR_M1_3

BARCODE_QR_M1_4

BARCODE_QR_M1_5

BARCODE_QR_M1_6

BARCODE_QR_M1_7

BARCODE_QR_M1_8

BARCODE_QR_M1_9

BARCODE_QR_M1_10

BARCODE_QR_M1_11

BARCODE_QR_M1_12

BARCODE_QR_M1_13

BARCODE_QR_M1_14

BARCODE_QR_M1_DEF

LEADTOOLS supports the reading and writing of the above barcode types for all bitmaps currently supported by LEADTOOLS. For a full list of supported file formats, refer to Summary of All Supported Image File Formats .

Before using any of the functions for reading or writing barcodes, or finding duplicate barcodes, the Barcode DLLs must be loaded and the engine initialized by calling L_BarCodeInit. The barcode functions described below can then be used. Before terminating the application however, L_BarCodeExit must be called to close the engine and free the DLLs.

LEADTOOLS provides one function for recognizing barcodes in the bitmap, and another function for writing the barcode to the bitmap.

You can use the L_BarCodeRead function, to search for barcodes in the bitmap. This function can recognize one or more barcodes in the bitmap with suitable function parameters. To write linear, Data matrix or PDF barcode symbols, use the L_BarCodeWriteExt function. To write these barcode symbols and QR barcode symbols, use L_BarCodeWriteExt2. Use the L_BarCodeVersionInfo function to get the Barcode product information.

You can read/write barcodes by specifying a color for bars and space. Also, you can write transparent barcode, but the transparent feature is not recommended.

In addition to the Barcode functions given above, there are a number of functions for getting duplicated barcodes. These are as follows: L_BarCodeIsDuplicated, L_BarCodeGetDuplicated, L_BarCodeGetFirstDuplicated and L_BarCodeGetNextDuplicated.

If you want to change the duplicated barcode, you must change the nSizeofBarCodeData, and pszBarCodeData members of BARCODEDATA structure.

To retrieve information about a barcode, use the L_BarCodeVersionInfo.

When the array of structures allocated by L_BarCodeRead is no longer needed, the memory should be freed using L_BarCodeFree.


Barcode Files To Be Included With Your Application

The installation procedure creates a directory tree for the LEADTOOLS files, and adds the demonstration programs and online help to your desktop. You specify the root directory during installation. The following subdirectory is created:

REDIST\BARCODE

Redistributable Barcode files.

Note: | You may not copy or redistribute any of the following files without obtaining the proper license. In some cases, the license is included with your initial purchase of LEADTOOLS. In other cases, you must obtain a license from a third party or enter into a royalty agreement with LEAD to obtain the proper license. For these special licensing situations, see the notes below accompanying the specific file.
Note: | You may not distribute the header files with your application, and you may not provide software development capabilities in your application.

The following table summarizes the files you must include on your distribution diskettes to support the LEADTOOLS Barcode functions on a WIN32 system. (\REDIST\ subdirectory contains copies of these files.)

Please note that LTKRN is required for ALL API applications. For more information on LTKRN and other files for the Main API, refer to Files To Be Included With Your Application .

Redistributables: | Explanation: | If you are using a standard release without Unicode, the files to use are: | If you are using a standard release with Unicode, the files to use are: | If you are using an evaluation release without Unicode, the files to use are: | If you are using an evaluation release with Unicode, the files to use are:
LTBAR | Barcode Support. The header file is LTBAR.H. AX6R32N.DLL is for Reading PDF417 barcodes (2D). AX6W32N.DLL is for Writing PDF417 barcodes (2D). AXBAR32N.DLL is for Reading and Writing Advanced Linear barcodes (1D). AX7R32N.DLL is for Reading Data Matrix barcodes (2D). AX7W32N.DLL is for Writing Data Matrix barcodes (2D). AXBAR32S.DLL is for Reading and Writing Standard linear barcodes (1D) AX8R32N.DLL is for Reading QR barcodes (2D) AX8W32N.DLL is for Writing QR barcodes (2D) | DLL: LTBAR14N.DLL AX6R32N.DLL AX6W32N.DLL AXBAR32N.DLL AX7R32N.DLL AX7W32N.DLL AXBAR32S.DLL AX8R32N.DLL AX8W32N.DLL Library: LTBAR_N.LIB. | DLL: LTBAR14NU.DLL AX6R32N.DLL AX6W32N.DLL AXBAR32N.DLL AX7R32N.DLL AX7W32N.DLL AXBAR32S.DLL AX8R32N.DLL AX8W32N.DLL Library: LTBAR_NU.LIB. | DLL: LTBAR14E.DLL AX6R32N.DLL AX6W32N.DLL AXBAR32N.DLL AX7R32N.DLL AX7W32N.DLL AXBAR32S.DLL AX8R32N.DLL AX8W32N.DLL Library: LTBAR_E.LIB. | DLL: LTBAR14EU.DLL AX6R32N.DLL AX6W32N.DLL AXBAR32N.DLL AX7R32N.DLL AX7W32N.DLL AXBAR32S.DLL AX8R32N.DLL AX8W32N.DLL Library: LTBAR_EU.LIB..


Installation Directory

The installation procedure creates a directory tree for the LEADTOOLS files, and adds the demonstration programs and online help to your desktop. You specify the root directory during installation.

Please note that due to the large size of the PDF files that contain the LEADTOOLS manuals, these files are no longer included in the setup. Instead, these PDF files can be downloaded from our website at http://support.leadtools.com/SupportPortal/DesktopDefault.aspx?tabindex=3&tabid=27.

The following is a list of the subdirectories in the root directory:

ACROBAT | LEADTOOLS manuals in the PDF format, which you can view and print using Adobe Acrobat. These files are optional and are available when installing from the CD-ROM.
BIN | Executable files for the demonstration programs.
HELP | Online help files.
IMAGES | Sample images and databases containing images.
EXAMPLES\DLL | One subdirectory for each example API program.
EXAMPLES\OCX | One subdirectory for each example ActiveX program.
EXAMPLES\COM | One subdirectory for each example COM program.
EXAMPLES\CLASSLIB | One subdirectory for each example Class Library program.
EXAMPLES\RES | Resource files for the example programs.
INCLUDE | Header files, BAS files, and the ActiveX's MFC interface files for versions of Visual C++ earlier than 4.0.
INCLUDE\CLASSLIB | Header files for the Class Library
LIB | Library files.
REDIST | Redistributable files. These are copies of the LEADTOOLS files and other files that you may need to distribute with your application. For exact information about required files, refer to Files To Be Included With Your Application.


Technical Support

As a registered user, free technical support is available. You must register your software to receive any technical support. Technical support is available 9 a.m. through 6 p.m. Eastern Standard Time. If you are calling by phone, please be at your computer. You can also contact us through the following methods:

Phone: | (704) 372-9681
E-mail: | support@leadtools.com
FAX: | (704) 372-8161
Home page: | http://www.leadtools.com
FTP: | ftp.leadtools.com

You can also contact LEAD by mail at:

LEAD Technologies, Inc.
Attn: Technical Support
Suite 400
1201 Greenwood Cliff
Charlotte, NC 28204

Before calling technical support, please look in the online documentation and the example programs for an answer to your question.


API Function Groups

BarCode API Function Groups

Loading and Unloading BarCode DLLs

L_BarCodeInit

L_BarCodeExit

Reading BarCodes

L_BarCodeRead

Writing BarCodes

L_BarCodeWriteExt

L_BarCodeWriteExt2

Freeing BarCodes

L_BarCodeFree

Finding Duplicate BarCodes

L_BarCodeGetDuplicated

L_BarCodeGetFirstDuplicated

L_BarCodeGetNextDuplicated

L_BarCodeIsDuplicated

Getting BarCode Version Information

L_BarCodeVersionInfo


Data Types

Basic Data Types and Keywords

LEADTOOLS Basic Data Types

Keywords Used in Declarations

Bar Code Structures

BARCODE1D

BARCODECOLOR

BARCODEDATA

BARCODEREADPDF

BARCODEVERSION

BARCODEWRITEPDF

BARCODEWRITEDM


LEADTOOLS Basic Data Types

LEADTOOLS has defined the following basic data types for portability:

Data Type | Definition and Usage
L_BITFIELD | Defined as L_UINT; used as a bit field.
L_BOOL | Defined as L_UINT; used as a boolean value.
L_CHAR | Defined as char; used as a signed 8-bit integer.
L_DOUBLE | Defined as double; used as a double precision floating point number.
L_FLOAT | Defined as float; used as a floating point number.
L_INT | Defined as int; used as a signed integer, 16-bits or larger.
L_INT16 | Defined as short; used as a signed 16-bit integer.
L_INT32 | Defined as long; used as a signed 32-bit integer.
L_UCHAR | Defined as unsigned char; used as an unsigned 8-bit integer.
L_UINT | Defined as unsigned; used as an unsigned integer, 16-bits or larger.
L_UINT16 | Defined as unsigned short; used as an unsigned 16-bit integer.
L_UINT32 | Defined as unsigned long; used as an unsigned 32-bit integer.
L_VOID | Defined as void; used as a void.
L_COMP | Defined as L_UINT; used as a handle to a computer
L_MEDIA | Defined as L_VOID L_FAR *; used as a void pointer
L_TCHAR | Defined as either char or TCHAR. If FOR_UNICODE is defined, then L_TCHAR will be defined as TCHAR.


Keywords Used in Declarations

LEADTOOLS uses the following keywords in declarations of functions, structures, and datatypes:

Keyword | Definition and Usage
L_FAR | Defined as nothing; used as a placeholder.
L_HUGE | Defined as nothing; used as a placeholder.
L_EXPORT | Defined as nothing; used as a placeholder.
L_PASCAL | Defined as nothing; used as a placeholder.
EXT_FUNCTION | Defined as WINAPI; used as an attribute for all toolkit functions.
pEXT_FUNCTION | Defined as EXT_FUNCTION L_FAR *; used as an attribute when defining pointers to toolkit functions.
EXT_CALLBACK | Defined as _cdecl L_FAR; used as an attribute for all toolkit callback functions.
pEXT_CALLBACK | Defined as EXT_CALLBACK L_FAR *; used as an attribute when defining pointers to toolkit callback functions.


BARCODE1D

typedef struct tagBarCode1D
{
L_BOOL bOutShowText;
L_INT nDirection;
L_BOOL bErrorCheck;
L_INT nGranularity;
L_INT nMinLength;
L_INT nMaxLength;
L_INT nWhiteLines;
} BARCODE1D, L_FAR * pBARCODE1D;

This structure contains linear (1D) barcode information for reading or writing 1D bar codes.

Member | Description
bOutShowText | Indicates whether the barcode string will be shown or not. This member is valid for the L_BarCodeWriteExt and the L_BarCodeWriteExt2 functions. Possible values are:
 | Value | Meaning
 | TRUE | The barcode string will be shown.
 | FALSE | The barcode string will not be shown.

nDirection | Flag that indicates the orientation and direction for reading barcodes. This member is valid for the L_BarCodeRead. You can combine values when appropriate, by using a bitwise OR ( | ). Possible values are :
 | Value | Meaning
 | BARCODE_DIR_LEFT_TO_RIGHT | [0x001] To read from left to right across the bitmap.
 | BARCODE_DIR_RIGHT_TO_LEFT | [0x002] To read from right to left across the bitmap.
 | BARCODE_DIR_TOP_TO_BOTTOM | [0x004] To read from top to bottom across the bitmap.
 | BARCODE_DIR_BOTTOM_TO_TOP | [0x008] To read from bottom to top across the bitmap.
 | BARCODE_DIR_SKEW | [0x010] To read in a skewed or diagonal direction.
 | BARCODE_DIR_HORIZONTAL | [0x020] To read horizontally (left to right and right to left).
 | BARCODE_DIR_VERTICAL | [0x040] To read vertically (top to bottom and bottom to top).
 | BARCODE_DIR_DIAGONAL | [0x080] To read in a diagonal or skewed direction.
bErrorCheck | Enables or disables the use of an error check digit while reading or writing a bar code.
nGranularity | Number of scanned lines per column to skip when reading a barcode. 9 is the default value. This means that each tenth line will be scanned when looking for a barcode. Scanning every line will slow the search process while skipping too many lines may skip over the barcode. This member is valid for the L_BarCodeRead function.
nMinLength | The minimum length of a barcode string when searching for a non fixed length bar code. This member is valid for the L_BarCodeRead function.
nMaxLength | The maximum length of a barcode string This must be no greater than 64.
nWhiteLines | The number of lines of white space above and below the barcode symbol.

Comments

This structure is used with L_BarCodeRead, L_BarCodeWriteExt, and L_BarCodeWriteExt2 functions only for linear barcodes.

pBARCODE1D is a pointer to an BARCODE1D structure. Where the function parameter type is pBARCODE1D, you can declare a BARCODE1D variable, update the structure's fields, and pass the variable's address in the parameter. Declaring a pBARCODE1D variable is necessary only if your program requires a pointer.

The Linear barcodes are not supported in UNICODE.


BARCODECOLOR

typedef struct _tagBarCodeColor
{
DWORD dwColorBar;
DWORD dwColorSpace;
} BARCODECOLOR, L_FAR * pBARCODECOLOR;

This structure contains colors information for reading or writing barcodes

Member | Description
dwColorBar | Specifies the bar color for barcode. This is used as the color of the bars for writing. And if reading, this is used as the color of the bars when searching for the barcode in the image. The default is the color black - RGB(0, 0, 0).
dwColorSpace | Specifies the space color for barcode. This is used as the color of the spaces for writing. If reading, this is used as the color of the spaces when searching for the barcode in the image. The default is the color white - RGB(255,255,255).

Comments

The dwColorBar and dwColorSpace member are COLORREF type and they constructed by using the RGB macro.

This structure is used with L_BarCodeRead, L_BarCodeWriteExt, and L_BarCodeWriteExt2 functions for all barcode types.

The L_BarCodeRead L_BarCodeWriteExt, and L_BarCodeWriteExt2 functions will ignore these values when the bitmap is 1BPP. For 16 or 32 BPP images, this is the actual value of the pixel as found in the image and not a COLORRF.

pBARCODECOLOR is a pointer to an BARCODECOLOR structure. Where the function parameter type is pBARCODECOLOR, you can declare a BARCODECOLOR variable, update the structure's fields, and pass the variable's address in the parameter. Declaring a pBARCODECOLOR variable is necessary only if your program requires a pointer.


BARCODEDATA

typedef struct tagBarCodeData
{
L_INT nGroup;
L_UINT32 ulType;
L_INT nUnits;
RECT rcBarLocation;
L_INT nSizeofBarCodeData;
L_CHAR L_FAR pszBarCodeData;
L_INT nIndexDuplicate;
L_INT nTotalCount;

L_INT nDupCount
} BARCODEDATA, L_FAR * pBARCODEDATA;

This structure contains bar code information.

Member | Description
nGroup | Specifies whether the barcode symbol is a member of a group of symbols. This member is used for reading PDF417 symbols.
ulType | Barcode type. Possible values are :
 | Value | Meaning
 | Linear (1D) barcode symbols: |
 | BARCODE_1D_EAN_13 | [0x00000001] EAN 13 type.
 | BARCODE_1D_EAN_8 | [0x00000002] EAN 8 type.
 | BARCODE_1D_UPC_A | [0x00000004] UPC version A type.
 | BARCODE_1D_UPC_E | [0x00000008] UPC version E type.
 | BARCODE_1D_CODE_3_OF_9 | [0x00000010] Code 3 of 9 (Code 39) type.
 | BARCODE_1D_CODE_128 | [0x00000020] Code 128 type.
 | BARCODE_1D_CODE_I2_OF_5 | [0x00000040] Interleaved 2 of 5 type.
 | BARCODE_1D_CODA_BAR | [0x00000080] CODABAR type.
 | BARCODE_1D_UCCEAN_128 | [0x00000100] UCCEAND 128 type (for read only)
 | BARCODE_1D_CODE_93 | [0x00000200] Code 93 type.
 | PDF417 barcode symbol: |
 | BARCODE_PDF417 | [0x00002000] To read PDF417 type.
 | Data Matrix barcode symbol: |
 | BARCODE_DM_10x10 | [0x00000102] Data Matrix Type 10x10.
 | BARCODE_DM_12x12 | [0x00000103] Data Matrix Type 12x12.
 | BARCODE_DM_14x14 | [0x00000104] Data Matrix Type 14x14.
 | BARCODE_DM_16x16 | [0x00000105] Data Matrix Type 16x16.
 | BARCODE_DM_18x18 | [0x00000106] Data Matrix Type 18x18.
 | BARCODE_DM_20x20 | [0x00000107] Data Matrix Type 20x20.
 | BARCODE_DM_22x22 | [0x00000108] Data Matrix Type 22x22.
 | BARCODE_DM_24x24 | [0x00000109] Data Matrix Type 24x24.
 | BARCODE_DM_26x26 | [0x0000010A] Data Matrix Type 26x26.
 | BARCODE_DM_32x32 | [0x0000010B] Data Matrix Type 32x32.
 | BARCODE_DM_36x36 | [0x0000010C] Data Matrix Type 36x36.
 | BARCODE_DM_40x40 | [0x0000010D] Data Matrix Type 40x40.
 | BARCODE_DM_44x44 | [0x0000010E] Data Matrix Type 44x44.
 | BARCODE_DM_48x48 | [0x0000010F] Data Matrix Type 48x48.
 | BARCODE_DM_52x52 | [0x00000110] Data Matrix Type 52x52.
 | BARCODE_DM_64x64 | [0x00000111] Data Matrix Type 64x64.
 | BARCODE_DM_72x72 | [0x00000112] Data Matrix Type 72x72.
 | BARCODE_DM_80x80 | [0x00000113] Data Matrix Type 80x80.
 | BARCODE_DM_88x88 | [0x00000114] Data Matrix Type 88x88.
 | BARCODE_DM_96x96 | [0x00000115] Data Matrix Type 96x96.
 | BARCODE_DM_104x104 | [0x00000116] Data Matrix Type 104x104.
 | BARCODE_DM_120x120 | [0x00000117] Data Matrix Type 120x120.
 | BARCODE_DM_132x132 | [0x00000118] Data Matrix Type 132x132.
 | BARCODE_DM_144x144 | [0x00000119] Data Matrix Type 144x144.
 | BARCODE_DM_8x18 | [0x0000011A] Data Matrix Type 8x18.
 | BARCODE_DM_8x32 | [0x0000011B] Data Matrix Type 8x32.
 | BARCODE_DM_12x26 | [0x0000011C] Data Matrix Type 12x26.
 | BARCODE_DM_12x36 | [0x0000011D] Data Matrix Type 12x36.
 | BARCODE_DM_16x36 | [0x0000011E] Data Matrix Type 16x36.
 | BARCODE_DM_16x48 | [0x0000011F] Data Matrix Type 16x48.
 | QR barcode symbol: |
 | BARCODE_QR_DEF | [0x00000300] Default QR Code size
 | BARCODE_QR_M2_1 | [0x00000301] QR Code Model 2, Version 1
 | BARCODE_QR_M2_2 | [0x00000302] QR Code Model 2, Version 2
 | BARCODE_QR_M2_3 | [0x00000303] QR Code Model 2, Version 3
 | BARCODE_QR_M2_4 | [0x00000304] QR Code Model 2, Version 4
 | BARCODE_QR_M2_5 | [0x00000305] QR Code Model 2, Version 5
 | BARCODE_QR_M2_6 | [0x00000306] QR Code Model 2, Version 6
 | BARCODE_QR_M2_7 | [0x00000307] QR Code Model 2, Version 7
 | BARCODE_QR_M2_8 | [0x00000308] QR Code Model 2, Version 8
 | BARCODE_QR_M2_9 | [0x00000309] QR Code Model 2, Version 9
 | BARCODE_QR_M2_10 | [0x0000030A] QR Code Model 2, Version 10
 | BARCODE_QR_M2_11 | [0x0000030B] QR Code Model 2, Version 11
 | BARCODE_QR_M2_12 | [0x0000030C] QR Code Model 2, Version 12
 | BARCODE_QR_M2_13 | [0x0000030D] QR Code Model 2, Version 13
 | BARCODE_QR_M2_14 | [0x0000030E] QR Code Model 2, Version 14
 | BARCODE_QR_M2_15 | [0x0000030F] QR Code Model 2, Version 15
 | BARCODE_QR_M2_16 | [0x00000310] QR Code Model 2, Version 16
 | BARCODE_QR_M2_17 | [0x00000311] QR Code Model 2, Version 17
 | BARCODE_QR_M2_18 | [0x00000312] QR Code Model 2, Version 18
 | BARCODE_QR_M2_19 | [0x00000313] QR Code Model 2, Version 19
 | BARCODE_QR_M2_20 | [0x00000314] QR Code Model 2, Version 20
 | BARCODE_QR_M2_21 | [0x00000315] QR Code Model 2, Version 21
 | BARCODE_QR_M2_22 | [0x00000316] QR Code Model 2, Version 22
 | BARCODE_QR_M2_23 | [0x00000317] QR Code Model 2, Version 23
 | BARCODE_QR_M2_24 | [0x00000318] QR Code Model 2, Version 24
 | BARCODE_QR_M2_25 | [0x00000319] QR Code Model 2, Version 25
 | BARCODE_QR_M2_26 | [0x0000031A] QR Code Model 2, Version 26
 | BARCODE_QR_M2_27 | [0x0000031B] QR Code Model 2, Version 27
 | BARCODE_QR_M2_28 | [0x0000031C] QR Code Model 2, Version 28
 | BARCODE_QR_M2_29 | [0x0000031D] QR Code Model 2, Version 29
 | BARCODE_QR_M2_30 | [0x0000031E] QR Code Model 2, Version 30
 | BARCODE_QR_M2_31 | [0x0000031F] QR Code Model 2, Version 31
 | BARCODE_QR_M2_32 | [0x00000320] QR Code Model 2, Version 32
 | BARCODE_QR_M2_33 | [0x00000321] QR Code Model 2, Version 33
 | BARCODE_QR_M2_34 | [0x00000322] QR Code Model 2, Version 34
 | BARCODE_QR_M2_35 | [0x00000323] QR Code Model 2, Version 35
 | BARCODE_QR_M2_36 | [0x00000324] QR Code Model 2, Version 36
 | BARCODE_QR_M2_37 | [0x00000325] QR Code Model 2, Version 37
 | BARCODE_QR_M2_38 | [0x00000326] QR Code Model 2, Version 38
 | BARCODE_QR_M2_39 | [0x00000327] QR Code Model 2, Version 39
 | BARCODE_QR_M2_40 | [0x00000328] QR Code Model 2, Version 40
 | BARCODE_QR_M1_1 | [0x00000329] QR Code Model 1, Version 1
 | BARCODE_QR_M1_2 | [0x0000032A] QR Code Model 1, Version 2
 | BARCODE_QR_M1_3 | [0x0000032B] QR Code Model 1, Version 3
 | BARCODE_QR_M1_4 | [0x0000032C] QR Code Model 1, Version 4
 | BARCODE_QR_M1_5 | [0x0000032D] QR Code Model 1, Version 5
 | BARCODE_QR_M1_6 | [0x0000032E] QR Code Model 1, Version 6
 | BARCODE_QR_M1_7 | [0x0000032F] QR Code Model 1, Version 7
 | BARCODE_QR_M1_8 | [0x00000330] QR Code Model 1, Version 8
 | BARCODE_QR_M1_9 | [0x00000331] QR Code Model 1, Version 9
 | BARCODE_QR_M1_10 | [0x00000332] QR Code Model 1, Version 10
 | BARCODE_QR_M1_11 | [0x00000333] QR Code Model 1, Version 11
 | BARCODE_QR_M1_12 | [0x00000334] QR Code Model 1, Version 12
 | BARCODE_QR_M1_13 | [0x00000335] QR Code Model 1, Version 13
 | BARCODE_QR_M1_14 | [0x00000336] QR Code Model 1, Version 14
 | BARCODE_QR_M1_DEF | [0x00000337] Default Model 1 QR Code size
nUnits | Unit of measure for the rcBarLocation member. Possible values are:
 | Value | Meaning
 | BARCODE_SCANLINES_PER_PIXELS | [0] the rcBarLocation rectangle is measured in pixels.
 | BARCODE_INCHES | [1] the rcBarLocation rectangle is measured in inches. You must multiply the search area by 100 when using the L_BarCodeWriteExt or L_BarCodeWriteExt2 functions.
 | BARCODE_MILLIMETERS | [2] the rcBarLocation rectangle is measured in mm.
rcBarLocation | The barcode location on the bitmap.
pszBarCodeData | Pointer to the barcode data string.

nIndexDuplicate | Index to the next duplicated barcode. This member will be filled only by L_BarCodeRead function. Possible values are:
 | Value | Meaning
 | >=0 | Next duplicated index.
 | -1 | The barcode is not duplicated.
 | 0xFF | The barcode is the last duplicated one.
nTotalCount | Total barcode count found by L_BarCodeRead function.
nDupCount | Total count of bar codes duplicated for the current bar code. This member is filled by the L_BarCodeRead function.

Comments

This structure will be filled by L_BarCodeRead when reading in barcode information.

You can also fill this structure before calling L_BarCodeWriteExt or L_BarCodeWriteExt2 to print the barcode symbol on the bitmap.

Note:

The BARCODE_1D_UCCEAN_128 type is designed for reading UCCEAN 128 barcode only, and it is not designed for writing this barcode type.

The following table contains information for writing linear 1D barcodes:

 | EAN 13 | EAN 8 | UPC A | UPC E | Code 3 of 9 (Code 39) | CODABAR | Code 128 | Code Interleaved 2 of 5
Numerical digits | 0-9 | 0-9 | 0-9 | 0-9 | 0-9 | 0-9 | All ASCII characters | 0-9
Alpha char. | N/A | N/A | N/A | N/A | A-Z and space bar | N/A |  | N/A
Special char. | N/A | N/A | N/A | N/A | - . $ % + / | - . $ % + / |  | N/A
Data Length | 12 | 7 | 11 | 6 or 11 | 1-63 | 1-63 | 3-63 | 1-63
Min. width (pixels) | 113 | 80 | 113 | 70 | (I+4) * 15 | N/A | (I + 5) * 11 | (I*9)+ 9+ Q
Double width (pixels) | 226 | 170 | 226 | 140 | (I+4) * 30 | N/A | (I + 5) * 22 | ((I*9)+ 9+ Q) * 2
Triple width (pixels) | 339 | 255 | 339 | 210 | (I+4) * 45 | N/A | (I + 5) * 33 | ((I*9)+ 9+ Q) * 3
Quad width (pixels) | 452 | 340 | 452 | 280 | (I+4) * 60 | N/A | (I + 5) * 44 | ((I*9)+ 9+ Q) * 5
Quintuple width (pixels) | N/A | N/A | N/A | N/A | N/A | N/A |  | N/A
FNC1 Char Set A | N/A | N/A | N/A | N/A | N/A | N/A | 0x80 | N/A
FNC2 Char Set A | N/A | N/A | N/A | N/A | N/A | N/A | 0x81 | N/A
FNC3 Char Set A | N/A | N/A | N/A | N/A | N/A | N/A | 0x82 | N/A
FNC4 Char Set A | N/A | N/A | N/A | N/A | N/A | N/A | 0x83 | N/A
FNC1 Char Set B | N/A | N/A | N/A | N/A | N/A | N/A | 0x84 | N/A
FNC2 Char Set B | N/A | N/A | N/A | N/A | N/A | N/A | 0x85 | N/A
FNC3 Char Set B | N/A | N/A | N/A | N/A | N/A | N/A | 0x86 | N/A
FNC4 Char Set B | N/A | N/A | N/A | N/A | N/A | N/A | 0x87 | N/A
FNC1 Char Set C | N/A | N/A | N/A | N/A | N/A | N/A | 0x88 | N/A

For Code 3 of 9 and Code 128:

I = # of characters in the string

Code Interleaved 2 of 5

I = # of digits and must be even.

Q = Quite Zone – 36 elements

The Linear barcodes are not supported in UNICODE.


BARCODEREADPDF

typedef struct tagBarCodeReadPDF
{
L_INT nDirection;
} BARCODEREADPDF, L_FAR * pBARCODEREADPDF;

This structure contains information for reading PDF symbols.

Member | Description
nDirection | Flag that indicates the orientation and direction for reading barcodes. You can combine values when appropriate, by using a bitwise OR ( | ). Possible values are :
 | Value | Meaning
 | BARCODE_DIR_LEFT_TO_RIGHT | [0x001] To read from left to right across the bitmap.
 | BARCODE_DIR_RIGHT_TO_LEFT | [0x002] To read from right to left across the bitmap.
 | BARCODE_DIR_TOP_TO_BOTTOM | [0x004] To read from top to bottom across the bitmap.
 | BARCODE_DIR_BOTTOM_TO_TOP | [0x008] To read from bottom to top across the bitmap.
 | BARCODE_DIR_SKEW | [0x010] To read in a skewed or diagonal direction.
 | BARCODE_DIR_HORIZONTAL | [0x020] To read horizontally (left to right and right to left).
 | BARCODE_DIR_VERTICAL | [0x040] To read vertically (top to bottom and bottom to top).
 | BARCODE_DIR_DIAGONAL | [0x080] To read in a diagonal or skewed direction.

Comments

pBARCODEREADPDF is a pointer to an BARCODEREADPDF structure. Where the function parameter type is pBARCODEREADPDF, you can declare a BARCODEREADPDF variable, update the structure's fields, and pass the variable's address in the parameter. Declaring a pBARCODEREADPDF variable is necessary only if your program requires a pointer.


BARCODEVERSION

typedef struct tagBarCodeVersion
{
L_UCHAR Product[60];
L_INT MajorNumber;
L_INT MinorNumber;
L_UCHAR Date[16];
L_UCHAR Time[16];
} BARCODEVERSION, L_FAR * pBARCODEVERSION;

The BARCODEVERSION structure, which is filled in using the L_BarCodeVersionInfo function, provides information about the LEADTOOLS Barcode product.

Member | Description
Product | Character string that contains the product name.
MajorNumber | Major version number.
MinorNumber | Minor version number.
Date | Character string that contains the date of the build.
Time | Character string that contains the time of the build.

Comments

pBARCODEVERSION is a pointer to a BARCODEVERSION structure. Where a function parameter type is pBARCODEVERSION, you can declare a BARCODEVERSION variable and pass the variable's address in the parameter. Declaring a pBARCODEVERSION variable is necessary only if your program requires a pointer.


BARCODEWRITEPDF

typedef struct tagBarCodeWritePDF
{
L_UINT16 wEccPerc;
L_UINT16 wEccLevel;
L_UINT16 wAspectHeight;
L_UINT16 wAspectWidth;
L_UINT16 wModAspectRatio;
L_UINT16 wColumns;
L_UINT16 wRows;
L_UINT16 wModule;
L_INT nJustify;
} BARCODEWRITEPDF, L_FAR * pBARCODEWRITEPDF;

This structure contains PDF417 symbol information.

Member | Description
wEccPerc | Determines the ECC character percentage. This will be used when wEccLevel is BARCODE_PDF417_ECCUSE_PERCENT.
wEccLevel | Determines the ECC level for writing a PDF417 symbol. Possible values are :
 | Value | Meaning
 | BARCODE_PDF417_ECCLEVEL_0 | [0x0001] Use ECC level 0. This uses 2 code words for error correction.
 | BARCODE_PDF417_ECCLEVEL_1 | [0x0002] Use ECC level 0. This uses 4 code words for error correction.
 | BARCODE_PDF417_ECCLEVEL_2 | [0x0004] Use ECC level 0. This uses 8 code words for error correction.
 | BARCODE_PDF417_ECCLEVEL_3 | [0x0008] Use ECC level 0. This uses 16 code words for error correction.
 | BARCODE_PDF417_ECCLEVEL_4 | [0x0010] Use ECC level 0. This uses 32 code words for error correction.
 | BARCODE_PDF417_ECCLEVEL_5 | [0x0020] Use ECC level 0. This uses 64 code words for error correction.
 | BARCODE_PDF417_ECCLEVEL_6 | [0x0040] Use ECC level 0. This uses 128 code words for error correction.
 | BARCODE_PDF417_ECCLEVEL_7 | [0x0080] Use ECC level 0. This uses 256 code words for error correction.
 | BARCODE_PDF417_ECCLEVEL_8 | [0x0100] Use ECC level 0. This uses 512 code words for error correction.
 | BARCODE_PDF417_ECCUSE_PERCENT | [0x0FFF] Use the percentage to determine the ECC level.
wAspectHeight | The height of the aspect ratio of the symbol.
wAspectWidth | The width of the aspect ratio of the symbol.
wModAspectRatio | Specifies the ratio of the width of the smallest element (wModule) to the height of a row of the PDF417 symbol.
wColumns | Number of columns for writing a PDF417 symbol. When the BARCODE_COLROWASLIMITS flag is set, the function will not use wAspectHeight.
wRows | Number of rows for writing a PDF417 symbol. When the BARCODE_COLROWASLIMITS flag is set, the function will not use wAspectWidth.
wModule | The size of the smallest element in width.
nJustify | Determines the alignment (justification) of the resulting barcode symbols. You can combine values when appropriate, by using a bitwise OR ( | ). The following are valid values:
 | Value | Meaning
 | BARCODE_JUSTIFY_RIGHT | [0x1000] Justifies the PDF417 symbol to the right side of the bitmap.
 | BARCODE_JUSTIFY_H_CENTER | [0x2000] Justifies the PDF417 symbol in the horizontal center of the bitmap.
 | BARCODE_JUSTIFY_BOTTOM | [0x4000] Justifies the PDF417 symbol to the bottom side of the bitmap.
 | BARCODE_JUSTIFY_V_CENTER | [0x8000] Justifies the PDF417 symbol in the vertical center of the bitmap.

Comments

pBARCODEWRITEPDF is a pointer to an BARCODEWRITEPDF structure. Where the function parameter type is pBARCODEWRITEPDF, you can declare a BARCODEWRITEPDF variable, update the structure's fields, and pass the variable's address in the parameter. Declaring a pBARCODEWRITEPDF variable is necessary only if your program requires a pointer.


BARCODEWRITEDM

typedef struct _tagBARCODEWRITEDM
{
L_INT nSize;
L_UINT32 ulFlags;
L_CHAR cGroupNumber;
L_CHAR cGroupTotal;
L_UCHAR cFileIDLo;
L_UCHAR cFileIDHi;
L_INT nXModule;
} BARCODEWRITEDM, L_FAR * pBARCODEWRITEDM;

The BARCODEWRITEDM structure contains write information for Data Matrix symbols.

Member | Description
nSize | Size of the structure in bytes.
ulFlags | Flags that indicate how to configure the engine. You can combine values when appropriate, by using a bitwise OR ( | ). Possible values are:
 | Flags | Meaning
 | BARCODE_JUSTIFY_RIGHT | [0x1000] Justifies the Data Matrix symbol to the right side of the bitmap.
 | BARCODE_JUSTIFY_H_CENTER | [0x2000] Justifies the Data Matrix symbol in the horizontal center of the bitmap.
 | BARCODE_JUSTIFY_BOTTOM | [0x4000] Justifies the Data Matrix symbol to the bottom side of the bitmap.
 | BARCODE_JUSTIFY_V_CENTER | [0x8000] Justifies the Data Matrix symbol in the vertical center of the bitmap.
cGroupNumber | Specifies a group of Data Matrix symbols. The maximum number of symbols in a group is 16.
cGroupTotal | Specifies the total number of Data Matrix symbols in the group specified by the cGroupNumber member. The maximum number of symbols in a group is 16.
cFileIDLo | Specifies the low byte of the file ID number. The number must range from 1 to 254.
cFileIDHi | Specifies the high byte of the file ID number. The number must range from 1 to 254.
nXModule | The size of the written Data Matrix barcode, specified in 0.001 inch. If the value is too small, a minimum of 5 pixels will be used.

Comments

pBARCODEWRITEDM is a pointer to an BARCODEWRITEDM structure. Where the function parameter type is pBARCODEWRITEDM, you can declare a BARCODEWRITEDM variable, update the structure's fields, and pass the variable's address in the parameter. Declaring a pBARCODEWRITEDM variable is necessary only if your program requires a pointer.


BARCODEWRITEQR

typedef struct _tagBARCODEWRITEQR
{
L_UINT uStructSize;
L_UINT32 ulFlags;
L_INT nGroupNumber;
L_INT nGroupTotal;
L_INT nEccLevel;
L_INT nXModule;
} BARCODEWRITEQR, L_FAR * pBARCODEWRITEQR;

The BARCODEWRITEQR structure contains write information for QR symbols.

Member | Description
uStructSize | Size of this structure in bytes. Use the sizeof() macro to calculate this value.
ulFlags | Flags that indicate how the QR symbol is justified. You can combine values when appropriate, by using a bitwise OR ( | ). Possible values are:
 | Value | Meaning
 | BARCODE_JUSTIFY_RIGHT | [0x1000] Justify the QR symbol to the right side of the bitmap.
 | BARCODE_JUSTIFY_H_CENTER | [0x2000] Justify the QR symbol in the horizontal center of the bitmap.
 | BARCODE_JUSTIFY_BOTTOM | [0x4000] Justify the QR symbol to the bottom side of the bitmap.
 | BARCODE_JUSTIFY_V_CENTER | [0x8000] Justify the QR symbol in the vertical center of the bitmap.
nGroupNumber | Specifies a group of QR Code symbols. The maximum number of symbols in a group is 16.
nGroupTotal | Specifies the total number of QR Code symbols. The maximum number of symbols in a group is 16.
nEccLevel | ECC level of QR Code symbol to write. Possible values are:
 | Value | Meaning
 | BARCODE_QR_ECC_L | [0] QR Code ECC Level 'L', lowest capability
 | BARCODE_QR_ECC_M | [1] QR Code ECC Level 'M', standard capability
 | BARCODE_QR_ECC_Q | [2] QR Code ECC Level 'Q', high reliability
 | BARCODE_QR_ECC_H | [3] QR Code ECC Level 'H', maximum reliability
nXModule | Specifies the size of the written QR barcode in 0.001 inches. If the value is too small, a minimum of 5 pixels will be used.

Comments

pBARCODEWRITEQR is a pointer to a BARCODEWRITEQR structure. Where the function parameter type is pBARCODEWRITEQR, you can declare a BARCODEWRITEQR variable, update the structure's fields, and pass the variable's address in the parameter. Declaring a pBARCODEWRITEQR variable is necessary only if your program requires a pointer.


Return Codes

For a list of all possible return codes for LEADTOOLS Barcode API functions, refer to LEADTOOLS API Return Codes in the Main API help file.


L_BarCodeExit

#include "ltbar.h"

L_VOID EXT_FUNCTION L_BarCodeExit(L_VOID)

Closes the barcode engine and frees the loaded DLLs for Barcode operations from memory.

Returns

None.

Comments

This function closes and frees the LEADTOOLS Barcode DLLs. This must be the last barcode-related function that is called in an application. No other Barcode function can be used after L_BarCodeExit is called. To use other functions after calling this function, L_BarCodeInit must be called again.

Required DLLs and Libraries

LTBAR

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application

See Also

Functions: | L_BarCodeInit, L_BarCodeRead, L_BarCodeWriteExt, L_BarCodeFree, L_BarCodeIsDuplicated, L_BarCodeGetDuplicated, L_BarCodeGetFirstDuplicated, L_BarCodeGetNextDuplicated, L_BarCodeVersionInfo, L_BarCodeWriteExt2
Topics: | Programming with LEADTOOLS Barcode BarCode API Function Groups

Example

For an example, refer to L_BarCodeInit.


L_BarCodeFree

#include "ltbar.h"

L_VOID EXT_FUNCTION L_BarCodeFree(ppBarCodeData)

pBARCODEDATA L_FAR * ppBarCodeData;

/* address of a pointer to a BARCODEDATA structure */

Frees storage allocated for a Barcode Data array.

Parameter | Description
ppBarCodeData | Address of the pointer to the BARCODEDATAstructure array. This function will free the array of BARCODEDATA structures allocated by L_BarCodeRead.

Returns

None.

Comments

Call this function to free the memory allocated by L_BarCodeRead.

This function should be called when your program no longer needs a barcode data array.

Required DLLs and Libraries

LTBAR

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application

See Also

Functions: | L_BarCodeRead, L_BarCodeWriteExt, L_BarCodeIsDuplicated, L_BarCodeGetDuplicated, L_BarCodeGetNextDuplicated, L_BarCodeVersionInfo, L_BarCodeGetFirstDuplicated, L_BarCodeWriteExt2
Topics: | Programming with LEADTOOLS Barcode BarCode API Function Groups

Example

For complete sample code refer to MFCBar32 demo.

For an example, refer to L_BarCodeRead.


L_BarCodeGetDuplicated

#include "ltbar.h"

L_INT EXT_FUNCTION L_BarCodeGetDuplicated(pBarCodeDataItem)

pBARCODEDATA pBarCodeDataItem;

/* pointer to a BARCODEDATA structure */

Returns the index of the first barcode that is a duplicate of the specified barcode.

Parameter | Description
pBarCodeDataItem | Pointer to the BARCODEDATA structure that contains barcode information.

Returns

>= 0 | The index of the duplicated barcode.
< 0 | An error occurred. Refer to Return Codes.

Comments

To determine whether a barcode is duplicated, use the L_BarCodeIsDuplicated function. If a barcode is duplicated, L_BarCodeGetDuplicated will return the index of the first barcode in the array after the specified barcode, which is a duplicate of the specified barcode.

If you know the index of a barcode within an array, you can get the index of the first duplicate of the specified barcode using L_BarCodeGetFirstDuplicated.

Required DLLs and Libraries

LTBAR

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application

See Also

Functions: | L_BarCodeRead, L_BarCodeWriteExt, L_BarCodeFree, L_BarCodeIsDuplicated, L_BarCodeGetNextDuplicated, L_BarCodeVersionInfo, L_BarCodeGetFirstDuplicated, L_BarCodeWriteExt2
Topics: | Programming with LEADTOOLS Barcode BarCode API Function Groups

Example

For complete sample code refer to MFCBar32 demo.

L_INT TestDuplicatedBarCode(HWND hWnd, pBARCODEDATA L_FAR * ppBarCodeData)
{
L_INT nDupIndex=0;
L_TCHAR szBuffer[256];

if (!ppBarCodeData) return FAILURE;
memset(szBuffer, 0, sizeof(szBuffer));

if (L_BarCodeIsDuplicated(&(*ppBarCodeData)[2]))
{
nDupIndex = L_BarCodeGetDuplicated(&(*ppBarCodeData)[2]);
if (nDupIndex >= 0)
{
// Print the first duplicated barcode data
wsprintf(szBuffer, TEXT("Data is %hs\nType %d\nUnits %d\nPosX %d\nPosY %d\nWidth %d\nHeight %d\n\n"),
(*ppBarCodeData)[nDupIndex].pszBarCodeData, (*ppBarCodeData)[nDupIndex].ulType, (*ppBarCodeData)[nDupIndex].nUnits,
(*ppBarCodeData)[nDupIndex].rcBarLocation.left,
(*ppBarCodeData)[nDupIndex].rcBarLocation.top,
abs((*ppBarCodeData)[nDupIndex].rcBarLocation.right - (*ppBarCodeData)[nDupIndex].rcBarLocation.left),
abs((*ppBarCodeData)[nDupIndex].rcBarLocation.bottom - (*ppBarCodeData)[nDupIndex].rcBarLocation.top));

MessageBox(hWnd, szBuffer, TEXT("BarCode Info."), MB_OK);

// find the next (second) duplicated barcode data
nDupIndex = L_BarCodeGetNextDuplicated(*ppBarCodeData, nDupIndex);

if (nDupIndex >= 0)
{
wsprintf(szBuffer, TEXT("Data is %hs\nType %d\nUnits %d\nPosX %d\nPosY %d\nWidth %d\nHeight %d\n\n"),
(*ppBarCodeData)[nDupIndex].pszBarCodeData, (*ppBarCodeData)[nDupIndex].ulType, (*ppBarCodeData)[nDupIndex].nUnits,
(*ppBarCodeData)[nDupIndex].rcBarLocation.left,
(*ppBarCodeData)[nDupIndex].rcBarLocation.top,
abs((*ppBarCodeData)[nDupIndex].rcBarLocation.right - (*ppBarCodeData)[nDupIndex].rcBarLocation.left),
abs((*ppBarCodeData)[nDupIndex].rcBarLocation.bottom - (*ppBarCodeData)[nDupIndex].rcBarLocation.top));

MessageBox(hWnd, szBuffer, TEXT("BarCode Info."), MB_OK);
}
}

if (nDupIndex < 0)
{
wsprintf(szBuffer, TEXT("An error occurred \nError Code = %d\n"), nDupIndex);
MessageBox(hWnd, szBuffer, TEXT("Notice!"), MB_OK);
}
}
else
{
wsprintf(szBuffer, TEXT("This Barcode is not duplicated ..."));
MessageBox(hWnd, szBuffer, TEXT("Notice!"), MB_OK);
}

return nDupIndex;
}


L_BarCodeGetFirstDuplicated

#include "ltbar.h"

L_INT EXT_FUNCTION L_BarCodeGetFirstDuplicated(pBarCodeData, nIndex)

pBARCODEDATA pBarCodeData; | /* pointer to the BARCODEDATA structures */
L_INT nIndex; | /* current barcode index*/

Returns the index of the first barcode in the array that is a duplicate of the barcode at index nIndex.

Parameter | Description
pBarCodeData | Pointer to an array of BARCODEDATA structures that contain barcode information for a bitmap. This parameter is the same array returned by L_BarCodeRead.
nCurIndex | Index of a barcode. This index is zero based.

Returns

>=0 | An index of duplicated barcode.
< 0 | An error occurred. Refer to Return Codes.

Comments

As an example, a call to L_BarCodeRead reads ten barcodes into a BARCODEDATA array. L_BarCodeIsDuplicated is called for the item at index 3 in the array, and TRUE is returned. Therefore one or more barcodes in the array are duplicates of the specified item.

Calling L_BarCodeGetFirstDuplicated returns the index of the first barcode in the array that is a duplicate of the barcode at index 3 in the array. Suppose this value is 0. The barcode present at index zero in the array is the first duplicate of the barcode at index 3.

Calling L_BarCodeGetNextDuplicated with nCurIndex set to 3 will return the index of the next barcode in the array that is a duplicate of the barcodes at index 0 and 3. Suppose this value is 9. Therefore the barcodes at index 0, index 3, and index 9 of the array are all duplicates.

Required DLLs and Libraries

LTBAR

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application

See Also

Functions: | L_BarCodeRead, L_BarCodeWriteExt, L_BarCodeFree, L_BarCodeIsDuplicated, L_BarCodeGetDuplicated, L_BarCodeVersionInfo, L_BarCodeGetNextDuplicated, L_BarCodeWriteExt2
Topics: | Programming with LEADTOOLS Barcode BarCode API Function Groups

Example

For complete sample code refer to MFCBar32 demo.

L_INT TestGetFirstDupBarCode(HWND hWnd, pBARCODEDATA L_FAR * ppBarCodeData)
{
L_INT nDupIndex=0;
L_TCHAR szBuffer[256];

if (!ppBarCodeData) return FAILURE;
memset(szBuffer, 0, sizeof(szBuffer));

// suppose you have more than 5 in ppBarCodeData of BARCODEDATA
if (L_BarCodeIsDuplicated(&(*ppBarCodeData)[5]))
{
nDupIndex = L_BarCodeGetFirstDuplicated(*ppBarCodeData, 5);
if (nDupIndex >= 0)
{
// Print the first duplicated bar code data
wsprintf(szBuffer, TEXT("Data is %hs\nType %d\nUnits %d\nPosX %d\nPosY %d\nWidth %d\nHeight %d\n\n"),
(*ppBarCodeData)[nDupIndex].pszBarCodeData, (*ppBarCodeData)[nDupIndex].ulType, (*ppBarCodeData)[nDupIndex].nUnits,
(*ppBarCodeData)[nDupIndex].rcBarLocation.left,
(*ppBarCodeData)[nDupIndex].rcBarLocation.top,
abs((*ppBarCodeData)[nDupIndex].rcBarLocation.right - (*ppBarCodeData)[nDupIndex].rcBarLocation.left),
abs((*ppBarCodeData)[nDupIndex].rcBarLocation.bottom - (*ppBarCodeData)[nDupIndex].rcBarLocation.top));
}
else
wsprintf(szBuffer, TEXT("An error occurred in L_BarCodeGetFirstDuplicated\nError Code = %d\n"), nDupIndex);
}
else
wsprintf(szBuffer, TEXT("This Bar Code does not duplicated ..."));

MessageBox(hWnd, szBuffer, ((nDupIndex >= 0) ? TEXT("BarCode Info.") : TEXT("Notice!")), MB_OK);

return nDupIndex;
}


L_BarCodeGetNextDuplicated

#include "ltbar.h"

L_INT EXT_FUNCTION L_BarCodeGetNextDuplicated(pBarCodeData, nCurIndex)

pBARCODEDATA pBarCodeData; | /* pointer to the BARCODEDATA structures */
L_INT nCurIndex; | /* current barcode index*/

Returns the index of the next barcode in the array that is a duplicate of the barcode at index nCurIndex.

Parameter | Description
pBarCodeData | Pointer to an array of BARCODEDATA structures that contain barcode information for a bitmap. This parameter is the same array returned by L_BarCodeRead.
nCurIndex | Index of the current duplicated barcode. The value returned by L_BarCodeGetNextDuplicated will be greater than this value. This index is zero based.

Returns

>=0 | An index of duplicated barcode.
< 0 | An error occurred. Refer to Return Codes.

Comments

As an example, a call to L_BarCodeRead reads ten barcodes into a BARCODEDATA array. L_BarCodeIsDuplicated is called for the item at index 3 in the array, and TRUE is returned. Therefore one or more barcodes in the array are duplicates of the specified item.

Calling L_BarCodeGetFirstDuplicated returns the index of the first barcode in the array that is a duplicate of the barcode at index 3 in the array. Suppose this value is 0. The barcode present at index three in the array is the first duplicate of the barcode at index 3.

Calling L_BarCodeGetNextDuplicated with nCurIndex set to 3 will return the index of the next barcode in the array that is a duplicate of the barcodes at index 0 and 3. Suppose this value is 9. Therefore the barcodes at index 0, index 3, and index 9 of the array are all duplicates.

Required DLLs and Libraries

LTBAR

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application

See Also

Functions: | L_BarCodeRead, L_BarCodeWriteExt, L_BarCodeFree, L_BarCodeIsDuplicated, L_BarCodeGetDuplicated, L_BarCodeVersionInfo, L_BarCodeGetFirstDuplicated, L_BarCodeWriteExt2
Topics: | Programming with LEADTOOLS Barcode BarCode API Function Groups

Example

For complete sample code refer to MFCBar32 demo.

For an example, refer to L_BarCodeGetDuplicated.


L_BarCodeInit

#include "ltbar.h"

L_INT EXT_FUNCTION L_BarCodeInit(nMajorType)

L_INT nMajorType;

/* Barcode major type */

Initializes the barcode engine and loads the required DLL's for Barcode operations into memory.

Parameter | Description
nMajorType | Barcode major type. Values can be combined, when appropriate, by using a bitwise OR ( | ). Possible values are:
 | Value | Meaning
 | BARCODES_1D | [0x001] initialize the linear barcode operations.
 | BARCODES_PDF_READ | [0x008] initialize the PDF barcode read operations.
 | BARCODES_PDF_WRITE | [0x010] initialize the PDF barcode write operations.
 | BARCODES_DATAMATRIX_READ | [0x020] initialize the Data Matrix barcode read operations.
 | BARCODES_DATAMATRIX_WRITE | [0x040] initialize the Data Matrix barcode write operations.
 | BARCODES_QR_READ | [0x080] initialize the QR barcode read operations
 | BARCODES_QR_WRITE | [0x100] initialize the QR barcode write operations

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

This function initializes the LEADTOOLS Barcode DLL's. Also, this function will load the required DLLs for Barcode operations into memory. This function must be called before calling any other Barcode functions. If L_BarCodeInit is called in an application, L_BarCodeExit must be called before terminating the application.

Required DLLs and Libraries

LTBAR

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application

See Also

Functions: | L_BarCodeExit, L_BarCodeRead, L_BarCodeWriteExt, L_BarCodeFree, L_BarCodeIsDuplicated, L_BarCodeGetDuplicated, L_BarCodeGetFirstDuplicated, L_BarCodeGetNextDuplicated, L_BarCodeVersionInfo, L_BarCodeWriteExt2
Topics: | Programming with LEADTOOLS Barcode BarCode API Function Groups

Example

int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpszCmdLine, int nCmdShow)
{
MSG msg ;
.
.
.
/* Initialize the engine for Linear barcode operations, Data Matrix Read operations, and PDF Read operations */
L_BarCodeInit (BARCODES_1D | BARCODES_DATAMATRIX_READ | BARCODES_PDF_READ);
.
.
.
while (GetMessage(&msg, NULL, 0, 0))
{
TranslateMessage(&msg) ;
DispatchMessage(&msg) ;
}
.
.
.
/* Close and free Bar Code DLLs */
L_BarCodeExit ();
return(msg.wParam);
}


L_BarCodeIsDuplicated

#include "ltbar.h"

L_BOOL EXT_FUNCTION L_BarCodeIsDuplicated(pBarCodeDataItem)

pBARCODEDATA pBarCodeDataItem;

/* pointer to a BARCODEDATA structure */

Returns a value that indicates whether the specified barcode is duplicated or not.

Parameter | Description
pBarCodeDataItem | Pointer to the BARCODEDATA structure that contains the barcode information.

Returns

TRUE | The specified barcode is duplicated.
FALSE | The specified barcode is not duplicated.

Comments

This function determines if a barcode is duplicated in another location in the bitmap.

To read in barcodes present in a bitmap, use the L_BarCodeRead function. Any item in the barcode array returned by L_BarCodeRead can be passed to L_BarCodeIsDuplicated.

If the specified barcode is duplicated, you can get the duplicated barcode using L_BarCodeGetDuplicated and to get the next duplicated barcode use L_BarCodeGetNextDuplicated.

If you know the index of a duplicated barcode, you can get the first duplicate of that barcode using L_BarCodeGetFirstDuplicated.

Required DLLs and Libraries

LTBAR

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application

See Also

Functions: | L_BarCodeRead, L_BarCodeWriteExt, L_BarCodeFree, L_BarCodeGetDuplicated, L_BarCodeGetNextDuplicated, L_BarCodeVersionInfo, L_BarCodeGetFirstDuplicated, L_BarCodeWriteExt2
Topics: | Programming with LEADTOOLS Barcode BarCode API Function Groups

Example

For complete sample code refer to MFCBar32 demo.

For an example, refer to L_BarCodeGetDuplicated.


L_BarCodeRead

#include "ltbar.h"

L_INT EXT_FUNCTION L_BarCodeRead(pBitmap, prcSearch, ulSearchType, nUnits, ulFlags, nMultipleMaxCount, pBarCode1D, pBarCodePDF, pBarCodeColor, ppBarCodeData)

pBITMAPHANDLE pBitmap; | /* pointer to the bitmap handle */
RECT L_FAR * prcSearch; | /* pointer to the area rectangle to search for*/
L_UINT32 ulSearchType; | /* the type of barcode to search for */
L_INT nUnits; | /* unit of measure */
L_UINT32 ulFlags; | /* flags that determine the function behavior */
L_INT nMultipleMaxCount; | /* maximum number of barcodes to search */
pBARCODE1D pBarCode1D; | /* pointer to the BARCODE1D structure */
pBARCODEREADPDF pBarCodePDF; | /* pointer to the BARCODEREADPDF structure */
pBARCODECOLOR pBarCodeColor; | /* pointer to the BARCODECOLOR structure */
pBARCODEDATA L_FAR * ppBarCodeData; | /* address of pointer to the BARCODEDATA structure */

Searches for barcodes within the specified area.

Parameter | Description
pBitmap | Pointer to the bitmap handle referencing the bitmap that holds the image data.
prcSearch | Pointer to the rectangle that contains the search area for the barcodes. Pass NULL to search the whole image. If this parameter is NULL and the image does not have a region, the entire image will be searched. If this parameter is NULL and the image does have a region, only the region will be searched.
ulSearchType | Type of barcode for which to search. You can combine values when appropriate, by using a bitwise OR ( | ). Possible values are:
 | Value | Meaning
 | Linear Barcode: |
 | BARCODE_1D_EAN_13 | [0x00000001] To read EAN 13 type.
 | BARCODE_1D_EAN_8 | [0x00000002] To read EAN 8 type.
 | BARCODE_1D_UPC_A | [0x00000004] To read UPC version A type.
 | BARCODE_1D_UPC_E | [0x00000008] To read UPC version E type.
 | BARCODE_1D_CODE_3_OF_9 | [0x00000010] To read Code 3 of 9 (Code 39) type.
 | BARCODE_1D_CODE_128 | [0x00000020] To read Code 128 type.
 | BARCODE_1D_CODE_I2_OF_5 | [0x00000040] To read Interleaved 2 of 5 type.
 | BARCODE_1D_CODA_BAR | [0x00000080] To read CODABAR type.
 | BARCODE_1D_UCCEAN_128 | [0x00000100] To read UCCEAND 128 type
 | BARCODE_1D_CODE_93 | [0x00000200] To read Code 93 type.
 | BARCODE_1D_READ_ANYTYPE | [0x00000FF0] To enable searching of all linear barcode types.
 | PDF Barcodes: |
 | BARCODE_PDF417 | [0x00002000] To read PDF417 type.
 | QR Barcodes: |
 | BARCODE_QR_CODE | [0x00100000] To read QR barcodes.
 | Data Matrix Barcode: |
 | BARCODE_DM_READ_SQUARE | [0x00010000] To read square Data Matrix symbols.
 | BARCODE_DM_READ_RECTANGLE | [0x00020000] To read rectangular Data Matrix symbols.
 | BARCODE_DM_READ_SMALL | [0x00040000] To read small Data Matrix symbols.
nUnits | Unit of measure. Possible values are:
 | Value | Meaning
 | BARCODE_SCANLINES_PER_PIXELS | [0] the rectangle search area is measured in pixels.
 | BARCODE_INCHES | [1] the rectangle search area is measured in inches. You must multiply the search area by 100. (i.e. to specify 1 inch set this to 100)
 | BARCODE_MILLIMETERS | [2] the rectangle search area is measured in mm.
ulFlags | Processing options. You can combine values when appropriate, by using a bitwise OR ( | ). The following values are used only when you want to search for linear barcodes. Pass 0 to get the default. Possible values are:
 | Value | Meaning
 | BARCODE_MARKERS | [0x0001] Enables the reading of barcodes that have start and end markers.
 | BARCODE_SEARCH_BLOCK | [0x0002] Search for barcodes by moving up or down through the rectangle until the first character is read or there is no barcode found.
 | BARCODE_USECOLORS | [0x0200] Enable searching for color barcodes. The colors are used as the exact bar and space colors for searching for the barcode.
 | BARCODE_RETURNCHECK | [0x1000] When setting this bit, then the check character will return in all cases, whether BARCODE1D.bErrorCheck is enabled or not.
 | BARCODE_RETURNCORRUPT | [0x080] Enables the engine to return the area that an un-readable PDF417 symbol was located.
 | BARCODE_RETURN_FOUR_POINTS | [0x00002000] Enable return of four corners and not bounding rectangle.
 | BARCODE_DM_FORCE_INVERT | [0x00000800] Force the Data Matrix read to search for reversed color symbols even if non-inverted color symbols were found.
 | BARCODE_DM_FASTFIND_DISABLE | [0x00001000] Disable fast find feature when reading Data Matrix symbols. Fast find is automatically disabled when reading small symbols.
 | BARCODE_PDF_READ_RETURN_PARTIAL | [0x01000000] Return PDF417 data even if ECC does not succeed.
 | BARCODE_PDF_READ_MODE_0 | [0x0000] Basic Channel Mode :No transmission of symbology ID, No escape doubling, Macro PDF is illegal.ECI is illegal, Reserved code words are illegal.
 | BARCODE_PDF_READ_MODE_1 | [0x1000] Extended Channel Mode.Transmit] L1 symbology ID. Escape doubling. Macro PDF is transmitted. ECI is transmitted. Reserved code words are transmitted.
 | BARCODE_PDF_READ_MODE_2 | [0x2000] Basic Channel Mode. Transmit ] L2 symbology ID. No escape doubling. Macro PDF is illegal. ECI is illegal. Reserved code words are illegal.
 | BARCODE_PDF_READ_MODE_3_BASIC | [0x3000] Basic Channel Mode. Transmit ] L0 symbology ID. No escape doubling. Macro PDF is illegal. ECI is illegal. Reserved code words are illegal.
 | BARCODE_PDF_READ_MODE_3_EXTENDED | [0x7000] Extended Channel Mode. Transmit ] L0 symbology ID. Escape doubling. Macro PDF is transmitted. ECI is transmitted in GLI format. Reserved code words transmitted.
 | BARCODE_PDF_READ_MACRO_OPTION_0 | [0x00010000] Enable the return of the optional macro ‘File Name’ field.
 | BARCODE_PDF_READ_MACRO_OPTION_1 | [0x00020000] Enable the return of the optional macro ‘Segment Count’ field.
 | BARCODE_PDF_READ_MACRO_OPTION_2 | [0x00040000] Enable the return of the optional macro ‘Time Stamp’ field.
 | BARCODE_PDF_READ_MACRO_OPTION_3 | [0x00080000] Enable the return of the optional macro ‘Sender’ field.
 | BARCODE_PDF_READ_MACRO_OPTION_4 | [0x00100000] Enable the return of the optional macro ‘Addressee’ field.
 | BARCODE_PDF_READ_MACRO_OPTION_5 | [0x00200000] Enable the return of the optional macro ‘File Size’ field.
 | BARCODE_PDF_READ_MACRO_OPTION_6 | [0x00400000] Enable the return of the optional macro ‘Checksum’ field.
 | BARCODE_PDF_READ_MACRO_OPTION_79AZ | [0x00800000] Enable the return of all optional macro fields 7 to 9 and A to Z.
nMultipleMaxCount | Specifies the maximum number of barcodes to search. Pass 0 to read all barcodes in a specified search area.
pBarCode1D | Pointer to the BARCODE1D structure. Pass NULL to use the default structure or if you don't want to search for linear barcodes.
pBarCodePDF | Pointer to the BARCODEREADPDF structure. Pass NULL to use the default structure or if you don't want to search for PDF barcodes.
ppBarCodeData | Address of the pointer to the BARCODEDATA structure, the function will automatically allocate an array of BARCODEDATA structures using the total number of barcodes found.
pBarCodeColor | Pointer to the BARCODECOLOR structure. Pass NULL to search for barcode using the default colors.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

This function supports all bitmaps currently supported by LEADTOOLS.

Use this function to recognize barcode data.

To determine if a barcode element is duplicated or not, use L_BarCodeIsDuplicated function. If the barcode is duplicated, you can get it using L_BarCodeGetDuplicated and to get the next duplicated barcode use L_BarCodeGetNextDuplicated.

If you know the index of a duplicated barcode, you can get the first duplicate of that barcode using L_BarCodeGetFirstDuplicated.

Since the function allocates storage to hold a Barcode array, you must free this storage by calling L_BarCodeFree.

When the BARCODE_USECOLORS flag is set, then this function will use the pBarCodeColor parameter, otherwise the function will ignore it and use the default colors of black for bars and white for spaces are used.

Using colors does not apply for 1 bit per pixel images.

The BARCODE_USECOLORS is used with all barcode kinds.

The BARCODE_RETURNCHECK flag used only with reading linear barcodes.

The smallest Data Matrix symbol size is 40 pixels by 40 pixels. It can be read using BARCODE_DM_READ_SMALL since this enables the reading of Data Matrix symbols that are between 20 to 40 pixels in size.

The Linear barcodes are not supported in UNICODE.

Required DLLs and Libraries

LTBAR

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application

See Also

Functions: | L_BarCodeWriteExt, L_BarCodeFree, L_BarCodeIsDuplicated, L_BarCodeGetDuplicated, L_BarCodeGetNextDuplicated, L_BarCodeVersionInfo, L_BarCodeGetFirstDuplicated, L_BarCodeWriteExt2
Topics: | Programming with LEADTOOLS Barcode BarCode API Function Groups

Example

For complete sample code refer to MFCBar32 demo.

L_INT TestBarCodeRead (HWND hWnd, pBITMAPHANDLE pBitmap)
{
BARCODE1D BarCode1D;
pBARCODEDATA pBarCodeData=NULL;
BARCODECOLOR BarColor;
L_TCHAR szBuffer[256];
L_INT nBarTotal;
L_INT i;
L_INT nRet;

memset(&BarCode1D, 0, sizeof(BARCODE1D));

BarColor.dwColorBar = RGB(0, 0, 255);
BarColor.dwColorSpace = RGB(255, 0, 0);
BarCode1D.bErrorCheck = TRUE;
BarCode1D.nGranularity = 9;
BarCode1D.nMinLength = 4;
BarCode1D.nDirection = BARCODE_DIR_LEFT_TO_RIGHT;

nRet = L_BarCodeRead(pBitmap, NULL, BARCODE_1D_EAN_13 | BARCODE_1D_EAN_8,
BARCODE_INCHES, BARCODE_MARKERS | BARCODE_USECOLORS, 10, &BarCode1D, NULL, &BarColor, &pBarCodeData);

if (nRet == SUCCESS)
{
nBarTotal = pBarCodeData[0].nTotalCount;

memset(szBuffer, 0, sizeof(szBuffer));
wsprintf(szBuffer, TEXT("Total Barcode Symbols Found is: %d\n\n"), nBarTotal);
MessageBox(hWnd, szBuffer, TEXT("Notice!"), MB_OK);

for (i=0; i< nBarTotal; i++)
{
memset(szBuffer, 0, sizeof(szBuffer));
wsprintf(szBuffer, TEXT("Barcode No. %d\nData is %hs\nType %s\nUnits %s\nPosX %d\nPosY %d\nWidth %d\nHeight %d\n\n"),
i, pBarCodeData[i].pszBarCodeData, (pBarCodeData[i].ulType == BARCODE_1D_EAN_13) ? TEXT("EAN 13") : TEXT("EAN 8"), TEXT("INCHES"),
pBarCodeData[i].rcBarLocation.left,
pBarCodeData[i].rcBarLocation.top,
abs(pBarCodeData[i].rcBarLocation.right - pBarCodeData[i].rcBarLocation.left),
abs(pBarCodeData[i].rcBarLocation.bottom - pBarCodeData[i].rcBarLocation.top));

MessageBox(hWnd, szBuffer, TEXT("BarCode Info."), MB_OK);
}

L_BarCodeFree(&pBarCodeData);
}
else
{
memset(szBuffer, 0, sizeof(szBuffer));
wsprintf(szBuffer, TEXT("An error occurred in L_BarCodeRead,\nError No. = %d\n"), nRet);
MessageBox(hWnd, szBuffer, TEXT("Error!"), MB_OK);
}
return nRet;
}


L_BarCodeVersionInfo

#include "ltbar.h"

L_INT EXT_FUNCTION L_BarCodeVersionInfo(pBarCodeVersion)

pBARCODEVERSION pBarCodeVersion;

/* pointer to a BARCODEVERSION structure */

Loads LEADTOOLS Barcode product information into a structure.

Parameter | Description
pBarCodeVersion | Pointer to the BARCODEVERSION structure to be updated with the barcode version information.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

To use this function, declare a BARCODEVERSION variable and pass its address as the parameter of this function. The function updates the fields in the structure. For field descriptions, refer to the BARCODEVERSION structure.

Required DLLs and Libraries

LTBAR

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application

See Also

Functions: | L_BarCodeRead, L_BarCodeWriteExt, L_BarCodeFree, L_BarCodeIsDuplicated, L_BarCodeGetDuplicated, L_BarCodeGetNextDuplicated, L_BarCodeGetFirstDuplicated, L_BarCodeWriteExt2
Topics: | Programming with LEADTOOLS Barcode BarCode API Function Groups

Example

For complete sample code refer to MFCBar32 demo.

L_VOID GetBarCodeVerInfo(HWND hWnd)
{
BARCODEVERSION BarVerInfo; /* LEAD BARCODE Version Information structure. */
L_TCHAR szBuffer[1024]; /* Buffer to hold information for display. */

/* Get the version information */
L_BarCodeVersionInfo (&BarVerInfo);

/* Format the message string with data from the BARCODEVERSION structure */
wsprintf(szBuffer, TEXT("LEAD Product: %hs\n\nVersion %d.%d\n\nDate: %hs\n\nTime: %hs"),
(L_TCHAR L_FAR *)BarVerInfo.Product, BarVerInfo.MajorNumber,
BarVerInfo.MinorNumber, (L_TCHAR L_FAR *)BarVerInfo.Date, (L_TCHAR L_FAR *)BarVerInfo.Time);

/* Display the message string */
MessageBox(hWnd, szBuffer, TEXT("BARCODE API Version Information"), MB_OK );
}


L_BarCodeWriteExt

#include "ltbar.h"

L_INT EXT_FUNCTION L_BarCodeWriteExt(pBitmap, pBarCodeData, pBarCodeColor, ulFlags, pBarCode1D, pBarCodePDF, pBarCodeDM, lprcSize)

pBITMAPHANDLE pBitmap; | /* pointer to the bitmap handle */
PBARCODEDATA pBarCodeData; | /* pointer to the BARCODEDATA structure */
pBARCODECOLOR pBarCodeColor; | /* pointer to the BARCODECOLOR structure */
L_UINT32 ulFlags; | /* flags that determine the function behavior */
pBARCODE1D pBarCode1D; | /* pointer to a BARCODE1D structure */
pBARCODEWRITEPDF pBarCodePDF; | /* pointer to the BARCODEWRITEPDF structure */
BARCODEWRITEDM pBarCodeDM; | /* pointer to a BARCODEWRITEDM structure */
LPRECT lprcSize; | /* pointer to RECT structure to be updated */

Writes linear, PDF, and Data Matrix barcode symbols over the bitmap.

Parameter | Description
pBitmap | Pointer to the bitmap handle referencing the bitmap on which the barcode will be written.
pBarCodeData | Pointer to a BARCODEDATA structure that contains the barcode information to be written over the image.
pBarCodeColor | Pointer to the BARCODECOLOR structure. Pass NULL to search for barcode using the default colors.
ulFlags | Flags that determine the function behavior. You can combine values when appropriate, by using a bitwise OR ( | ). The following values are used only when you want to write Data Matrix or PDF barcodes. Pass 0 to use the default values, based on the type of barcode being written. Possible values are:
 | Value | Meaning
 | BARCODE_TRUNCATE | [0x0010] Write Truncated PDF4167 symbols.
 | BARCODE_MSGAPPEND | [0x0020] Write the barcode symbol in group mode. Used for PDF.
 | BARCODE_INITREADER | [0x0040] Write the reader initialization flags for Data Matrix and PDF barcodes.
 | BARCODE_DISABLE_COMPRESSOPN | [0x0100] Write Data Matrix symbols without compression.
 | BARCODE_COLROWASLIMITS | [0x0080] Use column and row values as limits when a PDF symbol is written.
 | BARCODE_USECOLORS | [0x0200] Write color barcode. The colors are used as the exact bar and space colors for searching for the barcode.
 | BARCODE_TRANSPARENT | [0x0400] Write barcodes with a transparent background. This is not recommended.
 | BARCODE_JUSTIFYRIGHT | [0x0010] Justify linear barcode symbols to the right side of the window described by BARCODEDATA.rcBarLocation.
 | BARCODE_JUSTIFYHCENTER | [0x0020] Justify linear barcode symbols to the horizontal center of the window described by BARCODEDATA.rcBarLocation.
pBarCode1D | Pointer to the BARCODE1D structure that contains the information related to linear barcodes. Pass NULL to use the default or if you don't want to write a linear barcode.
pBarCodePDF | Pointer to the BARCODEWRITEPDF structure that contains the information related to PDF417 barcodes. Pass NULL to use the default or if you don't want to write a PDF417 barcode.
pBarCodeDM | Pointer to the BARCODEWRITEDM structure that contains the information related to Data Matrix barcodes. Pass NULL to use the default or if you don't want to write a Data Matrix barcode.
lprcSize | Pointer to the RECT structure to be updated with the barcode size before writing the barcode over the bitmap. If the user passes a valid pointer, then the function will calculate the size of the barcode and will update this parameter with the barcode size. Pass NULL to write the barcode.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

This function supports linear, PDF, and Data Matrix barcodes, but not QR barcodes. To write QR barcodes, as well as linear, PDF and Data Matrix barcodes, use L_BarCodeWriteExt2.

This function supports all bitmaps currently supported by LEADTOOLS.

You must pass an allocated bitmap to this function.

The L_BarCodeWriteExt function will write the barcode symbol over the bitmap using the rectangle defined by the rcBarLocation member in BARCODEDATA structure. However, if the bitmap has a region, this function will write the barcode using the region boundaries.

If the region is non-rectangular, the barcode will be written to the rectangle bounding the region and subsequently clipped to the given region. This might cause the resulting barcode to be unreadable.

When the BARCODE_USECOLORS flag is set, then this function will use the pBarCodeColor parameter, otherwise the function will ignore it and use the default colors of black for bars and white for spaces are used.

Using colors does not apply for 1 bit per pixel images.

The BARCODE_USECOLORS and BARCODE_TRANSPARENT are used with all barcode types.

Note:

This function does not support BARCODE_1D_UCCEAN_128.

The Linear barcodes are not supported in UNICODE.

Required DLLs and Libraries

LTBAR

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application

See Also

Functions: | L_BarCodeRead, L_BarCodeFree, L_BarCodeIsDuplicated, L_BarCodeGetDuplicated, L_BarCodeGetNextDuplicated, L_BarCodeVersionInfo, L_BarCodeGetFirstDuplicated, L_BarCodeWriteExt2
Topics: | Programming with LEADTOOLS Barcode BarCode API Function Groups

Example

For complete sample code refer to MFCBar32 demo.

L_INT TestBarCodeWrite (HWND hWnd, pBITMAPHANDLE pBitmap)
{
L_TCHAR szBuffer[256];
BARCODEDATA BarCodeData;
BARCODECOLOR BarColor;
BARCODE1D Bar1D;
L_INT nRet;

memset(&szBuffer, 0, sizeof(szBuffer));
memset(&BarCodeData, 0, sizeof(BARCODEDATA));
memset(&Bar1D, 0, sizeof(BARCODE1D));
BarColor.dwColorBar = RGB(0, 0, 255);
BarColor.dwColorSpace = RGB(255, 0, 0);

BarCodeData.rcBarLocation.left = 50; // 1/2 inch
BarCodeData.rcBarLocation.top = 50; // 1/2 inch
BarCodeData.rcBarLocation.right = 150; // 1.5 inch (width = 1 inch)
BarCodeData.rcBarLocation.bottom = 100; // 1 inch (height = ½ inch)
BarCodeData.nUnits = BARCODE_SCANLINES_PER_PIXELS;
BarCodeData.ulType = BARCODE_1D_EAN_13;
BarCodeData.pszBarCodeData = "123456789012";
BarCodeData.nSizeofBarCodeData = strlen(BarCodeData.pszBarCodeData);

Bar1D.bErrorCheck = TRUE;
Bar1D.bOutShowText= TRUE;

nRet = L_BarCodeWriteExt(pBitmap, &BarCodeData, &BarColor, BARCODE_USECOLORS, &Bar1D, NULL, NULL, NULL);
if (nRet == SUCCESS)
{
wsprintf(szBuffer, TEXT("A Barcode is written ..."));
MessageBox(hWnd, szBuffer, TEXT("Notice!"), MB_OK);
}
else
{
wsprintf(szBuffer, TEXT("An error occurred in L_BarCodeWriteExt,\nError No. = %d\n"), nRet);
MessageBox(hWnd, szBuffer, TEXT("Error!"), MB_OK);
}

return nRet;
}


L_BarCodeWriteExt2

#include "ltbar.h"

L _INT EXT_FUNCTION L_BarCodeWriteExt2(pBitmap, pBarCodeData, pBarCodeColor, ulFlags, pBarCode1D, pBarCodePDF, pBarCodeDM, pBarCodeQR, lprcSize)

pBITMAPHANDLE pBitmap; | /* pointer to the bitmap handle */
PBARCODEDATA pBarCodeData; | /* pointer to the BARCODEDATA structure */
pBARCODECOLOR pBarCodeColor; | /* pointer to the BARCODECOLOR structure */
L_UINT32 ulFlags; | /* flags that indicate the function behavior */
pBARCODE1D pBarCode1D; | /* pointer to the BARCODE1D structure */
pBARCODEWRITEPDF pBarCodePDF; | /* pointer to the BARCODEWRITEPDF structure */
BARCODEWRITEDM pBarCodeDM; | /* pointer to the BARCODEWRITEDM structure */
pBARCODEWRITEQR pBarCodeQR; | /* pointer to the BARCODEWRITEQR structure */
LPRECT lprcSize; | /* pointer to the RECT structure to be updated */

Writes linear, PDF, Data Matrix, and QR barcode symbols over the bitmap.

Parameter | Description
pBitmap | Pointer to the bitmap handle referencing the bitmap on which the barcode will be written.
pBarCodeData | Pointer to a BARCODEDATA structure that contains the barcode information to be written over the image.
pBarCodeColor | Pointer to the BARCODECOLOR structure that contains the color information to be written over the image. Pass NULL to write barcode using the default colors.
ulFlags | Flags that indicate the function behavior. You can combine values when appropriate, by using a bitwise OR ( | ). The following values are used only when you want to write Data Matrix or PDF barcodes. Pass 0 to use the default values, based on the type of barcode being written. Possible values are:
 | Value | Meaning
 | BARCODE_TRUNCATE | [0x0010] Write Truncated PDF4167 symbols.
 | BARCODE_MSGAPPEND | [0x0020] Write the barcode symbol in the group mode. Used for PDF.
 | BARCODE_INITREADER | [0x0040] Write the reader initialization flags for Data Matrix and PDF barcodes.
 | BARCODE_DISABLE_COMPRESSOPN | [0x0100] Write Data Matrix symbols without compression.
 | BARCODE_COLROWASLIMITS | [0x0080] Use column and row values as limits when a PDF symbol is written.
 | BARCODE_USECOLORS | [0x0200] Write color barcode. The colors are used as the exact bar and space colors for searching for the barcode.
 | BARCODE_TRANSPARENT | [0x0400] Write barcodes with a transparent background. This is not recommended.
 | BARCODE_JUSTIFYRIGHT | [0x0010] Justify linear barcode symbols to the right side of the window described by BARCODEDATA.rcBarLocation.
 | BARCODE_JUSTIFYHCENTER | [0x0020] Justify linear barcode symbols to the horizontal center of the window described by BARCODEDATA.rcBarLocation.
pBarCode1D | Pointer to the BARCODE1D structure that contains the information related to linear barcodes. Pass NULL to use the default or if you don't want to write a linear barcode.
pBarCodePDF | Pointer to the BARCODEWRITEPDF structure that contains the information related to PDF417 barcodes. Pass NULL to use the default or if you don't want to write a PDF417 barcode.
pBarCodeDM | Pointer to the BARCODEWRITEDM structure that contains the information related to Data Matrix barcodes. Pass NULL to use the default or if you don't want to write a Data Matrix barcode.
pBarCodeQR | Pointer to the BARCODEWRITEQR structure that contains the information related to QR barcodes. Pass NULL to use the default or if you don't want to write a Data QR barcode.
lprcSize | Pointer to the RECT structure to be updated with the barcode size before writing the barcode over the bitmap. If the user passes a valid pointer, then the function will calculate the size of the barcode and will update this parameter with the barcode size. Pass NULL to write the barcode.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

While the L_BarCodeWriteExt function writes linear, PDF and Data Matrix barcodes only, the L_BarCodeWriteExt2 function writes all these barcodes, as well as QR barcodes.

This function supports all bitmaps currently supported by LEADTOOLS.

You must pass an allocated bitmap to this function. If you did not pass an allocated bitmap, the function wil return an error code.

The L_BarCodeWriteExt2 function will write the barcode symbol over the bitmap using the rectangle defined by the rcBarLocation member in the BARCODEDATA structure. However, if the bitmap has a region, this function will write the barcode using the region boundaries.

If the region is non-rectangular, the barcode will be written to the rectangle bounding the region and subsequently clipped to the given region. This might cause the resulting barcode to be unreadable.

If you set the ulFlags parameter to BARCODE_USECOLORS, then this function will use the pBarCodeColor parameter, otherwise the function will ignore it and use the default colors of black for bars and white for spaces.

Using colors does not apply for 1 bit per pixel images.

The BARCODE_USECOLORS and BARCODE_TRANSPARENT are used with all barcode types.

Required DLLs and Libraries

LTBAR

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | L _BarCodeRead, L_BarCodeFree, L_BarCodeIsDuplicated, L_BarCodeGetDuplicated, L_BarCodeGetNextDuplicated, L_BarCodeVersionInfo, L_BarCodeGetFirstDuplicated, L_BarCodeWriteExt
Topics: | Programming with LEADTOOLS Barcode BarCode API Function Groups

Example

For complete sample code refer to MFCBar32 demo.

L_INT TestBarCodeWrite2 (HWND hWnd, pBITMAPHANDLE pBitmap)
{
L_TCHAR      szBuffer[256];
BARCODEDATA BarCodeData;
BARCODECOLOR BarColor;
BARCODE1D   Bar1D;
L_INT       nRet;

memset(&szBuffer, 0, sizeof(szBuffer));
memset(&BarCodeData, 0, sizeof(BARCODEDATA));
memset(&Bar1D, 0, sizeof(BARCODE1D));
BarColor.dwColorBar = RGB(0, 0, 255);
BarColor.dwColorSpace = RGB(255, 0, 0);

BarCodeData.rcBarLocation.left = 50; // 1/2 inch
BarCodeData.rcBarLocation.top = 50; // 1/2 inch
BarCodeData.rcBarLocation.right = 150; // 1.5 inch (width
 = 1 inch)
BarCodeData.rcBarLocation.bottom = 100; // 1 inch (height
 = ½ inch)
BarCodeData.nUnits = BARCODE_SCANLINES_PER_PIXELS;
BarCodeData.ulType = BARCODE_1D_EAN_13;
BarCodeData.pszBarCodeData = "123456789012";
BarCodeData.nSizeofBarCodeData = strlen(BarCodeData.pszBarCodeData);

Bar1D.bErrorCheck = TRUE;
Bar1D.bOutShowText= TRUE;

nRet = L_BarCodeWriteExt2(pBitmap, &BarCodeData,
 &BarColor, BARCODE_USECOLORS,  &Bar1D, NULL, NULL, NULL,
 NULL);
if (nRet == SUCCESS)
{
wsprintf(szBuffer, TEXT("A Barcode
 is written ..."));
MessageBox(hWnd, szBuffer, TEXT("Notice!"),
 MB_OK);
}
else
{
wsprintf(szBuffer, TEXT("An error occurred
 in L_BarCodeWriteExt2.\nError No. = %d\n"), nRet);
MessageBox(hWnd, szBuffer, TEXT("Error!"),
 MB_OK);
}

return nRet;
}


LEADTOOLS Reference Manuals

LEADTOOLS provides reference manuals that contain the same information as the online help. You can print them from PDF files. Please note that due to the large size of the PDF files that contain the LEADTOOLS manuals, these files are no longer included in the setup. Instead, these PDF files can be downloaded from our website at http://support.leadtools.com/SupportPortal/DesktopDefault.aspx?tabindex=3&tabid=27.

To print the PDF files, you must use the Adobe Acrobat Reader 3.0 or higher. You can download a copy of the Acrobat Reader from the Adobe web site (http://www.adobe.com). Note that different versions of the Acrobat Reader are available for different operating systems, but they all can read the same PDF files.


Raster Pro/Document/Medical Features

Raster Pro:

LEADTOOLS Raster Imaging Pro provides some imaging capabilities that are not available in the LEADTOOLS Raster Imaging product. In order to access these features, you must unlock them by calling L_UnlockSupport(L_SUPPORT_LTPRO, L_KEY_LTPRO). L_KEY_LTPRO can be found in ltkey.h.

If you are a licensed user of LEADTOOLS Raster Imaging, and would like to access Raster Imaging Pro features, you must contact Tech Support for information on obtaining a license and the unlock key for calling L_UnlockSupport.

Document/Medical:

LEADTOOLS Document Imaging, LEADTOOLS Document Imaging Suite, LEADTOOLS Medical Imaging and LEADTOOLS Medical Imaging Suite are the most comprehensive imaging toolkits on the market. No other toolkit provides as many imaging features for color, gray-scale and black & white images in one development package, and for one price. These toolkits comprise LEAD's best code and are designed for the programmer who is looking for the fastest performance, and/or the most extensive color, document, and medical imaging capabilities available.

These toolkits contain powerful annotation capabilities and optimized document image processing filters, and high performance compression, decompression and viewing of JPEG, LEAD CMP, MRC and CCITT G3/G4. The annotation capabilities enable the programmer to add text, highlights, sticky notes, audio, ellipses, buttons, lines, arrows, rectangles, polygons, redaction (blackout), hotspots, freehand scribble, pointers, bitmap and text stamps, to black & white and color images. Programmers working with document imaging will also find special processing filters such as despeckle, deskew, favor black, and scale to gray to enhance their black and white 1 bit images. Additionally, you can achieve faster rotation in 90-degree increments by applying a rotated view perspective to the bitmap. These LEADTOOLS toolkits offer the fastest software-only JPEG decoder available.

LEADTOOLS Document Imaging

The LEADTOOLS Document Imaging toolkit contains all the features available in the LEADTOOLS Raster Imaging Pro. In addition, it contains the following capabilities:

Special functions for Document (bitonal) images. The LEADTOOLS functions for bitonal images are especially useful for working with images from black-and-white scanners or FAX machines. These functions let you do things such as automatically straighten (deskew) an image, remove spots (despeckle), or clarify a scaled display (using scale-to-gray and favor-black features).

Annotation. LEADTOOLS supports annotation of images by letting you overlay images with text, lines, shapes, arrows, buttons, highlights, hot spots, sticky notes, stamps, buttons, and sounds.

Fast rotation. LEADTOOLS achieves fast rotation in 90-degree increments by applying a rotated view perspective to the bitmap.

ISIS support. LEADTOOLS supports ISIS interfaces for driving scanning devices.

Faster compression and decompression. The Document/Medical editions work faster when loading and saving LEAD CMP, JPEG, and CCITT Group 3 and Group 4 images. The LEADTOOLS functions for loading and saving are the same in all products. The only difference is in performance.

1-bit Image Clean-up. The Document toolkits include support for removing dots, blobs, holes, inverted text, lines, borders, bumps and nicks from 1-bit images.

Region Clean-up. [Document/Medical] Remove all the holes from a region.

Embedded Messages. The Document toolkits include support for embedding messages in lossless image formats like bmp, tiff, lossless jpeg, etc. The message is embedded without any visible changes to the image, and does not appreciably increase the size of the image. The message is password-protected.

Image Conversion. The Document toolkits include support for transforming a bitmap into a binary image using specified thresholds or a threshold calculated automatically based on statistical features of the bitmap.

12 and 16 bit grayscale images. [Document/Medical] Load, process, display, window level and save 12 and 16 bit grayscale images (including support for 16-bit grayscale TIFF).

48 and 64 bit color images. [Document/Medical] Load, process, display, and save 48 and 64 bit color images.

MRC Support. [Document/Medical] LEADTOOLS supports the Mixed Raster Content format for color documents containing mixed image and text components. For more information, refer to the .

Halftoning. [Document/Medical] Convert 1-, 4-, 8-, 16-, 24-, or 32-bit bitmaps to a halftoned bitmap, with a specified pattern rotation. A halftoned bitmap is a 1-bit bitmap that has been dithered for black and white printing or display.

LEADTOOLS Document Imaging Suite

The LEADTOOLS Document Imaging Suite toolkit contains all the capabilities of LEADTOOLS Document Imaging, and includes the features listed below. Please note that the OCR features are included in this toolkit, however they can also be purchased as a plug-in for the LEADTOOLS Document Imaging toolkit. Also, JBIG support is provided in this toolkit, however a JBIG Module may be added on to LEADTOOLS Document Imaging, LEADTOOLS Medical Imaging or LEADTOOLS Medical Imaging Suite.

OCR features. [Document/Medical] LEAD offers OCR features that use Scansoft Textbridge technology. Support for these features is included in the LEADTOOLS Document Imaging Suite, and can be added, via plug-in to the LEADTOOLS Document Imaging, LEADTOOLS Medical Imaging and LEADTOOLS Medical Imaging Suite toolkits. The OCR features allow you to perform optical character recognition and turn images into documents. Features include preset confidence and accuracy levels for controlling how sensitive the engine is to unrecognized text, artificial intelligence for improving recognition on documents of the same type, and built-in and user-defined lexicons for limiting the type of text to recognize within a particular zone. LEADTOOLS provides the ability to verify or correct text during, and (using LEAD's unique OCR editor) after recognition. LEAD's OCR editor ties the text being edited directly to the image, providing a visual reference to the original bitmap data. The OCR engine can perform Automatic area segmentation creating multi-layered zones, recognizing areas such as tables, rules, images and text. Or, you can manually designate up to 250 such zones. The OCR features support different fonts, sizes (5 to 72 point) and styles. Fax, dot matrix and halftones can be preprocessed to improve recognition results. The OCR Engine supports major European and Scandinavian languages (Danish, Dutch, Finnish, French, German, Italian, Norwegian, Portuguese, Russian, Spanish, and Swedish) as well as English. Support for dialects such as US. English, French Canadian, Latin American Spanish, Swiss German, and Brazilian Portuguese is also provided.

Recognized text can be exported to more than 40 different formats, including MS Word, MS Excel, Dbase andWordPerfect. The LEADTOOLS OCR features contain superior OCR processing speeds, for use in form recognition and processing applications.

LEAD's JBIG filter. [Document/Medical] LEAD includes support for this filter in the LEADTOOLS Document Imaging Suite toolkit. Support for this filter can be added to LEADTOOLS Document Imaging, LEADTOOLS Medical Imaging or LEADTOOLS Medical Imaging Suite by purchasing the JBIG Module. JBIG defines a method for lossless compression encoding of a bi-level image (two-color image). This method can also be used for coding grayscale and color images. LEADTOOLS completely supports all three types of images, giving you the ability to make full use of this powerful compression technology. LEADTOOLS also supports the progressive capability of JBIG, allowing you to store and send multiple representations of images at different resolutions without any extra storage overhead.

LEADTOOLS Medical Imaging

LEADTOOLS Medical Imaging contains all the capabilities of LEADTOOLS Document Imaging. It also includes general medical imaging technologies (1-16,24,32 bit color, 1-16 bit grayscale and window leveling of 12 and 16-bit grayscale images) and support for the DICOM file format.

DICOM file support. [Medical] LEADTOOLS Medical Imaging provides COMPLETE support for the DICOM 3.0 specification, including all standard IOD classes and modalities (CR, CT, MR, NM, US, RF, SC, VL, etc.) and complete DICOM Basic Directory support.

Window leveling. [Document/Medical] Detect and set LowBit and HighBit for image data, display images with automatic LUT intensity expansion, or set LUT entries and ranges with specific values and gradients. Display images through the LUT without changing the data, or process the image data using the LUT. Linearize the number of pixels locally in a bitmap, based on the specified color space in order to bring out the detail in dark areas of an image, and smooth the edges between blocks.

Medical Imaging Processing. [Medical] LEADTOOLS Medical Imaging provides image processing functionality designed specifically to allow you to examine and improve the quality of medical images.

LEADTOOLS Medical Imaging Suite

LEADTOOLS Medical Imaging Suite contains all the capabilities of LEADTOOLS Medical Imaging. In addition, it supports the following:

DICOM Communication support. [Medical Suite] LEADTOOLS provides COMPLETE support for DICOM Communications, including all Service Classes (Verification, Storage, Query/Retrieve, Patient Management, etc), and contains high-level communications functions simplifying the creation of DICOM client/server applications.

(Document/Medical) is used in the documentation to designate the features that are available in LEADTOOLS Document Imaging, LEADTOOLS Document Imaging Suite, LEADTOOLS Medical Imaging and LEADTOOLS Medical Imaging Suite. Those features that are available only in the Medical toolkits are indicated in the documentation by (Medical). Features available only in the LEADTOOLS Medical Imaging Suite toolkit are indicated in the documentation by (Medical Suite).

(Internet only) is used in the documentation to designate the features that are available only in the LEADTOOLS Internet toolkit.

For more information, refer to Document/Medical Edition Support and Licensing Requirements .


Document/Medical Support and Licensing Requirements

Document/Medical Licensing and Royalty Agreements:

Congratulations! You have licensed one of the LEADTOOLS Document/Medical software products, the most comprehensive imaging toolkits on the market, enabling you to create powerful imaging applications. The license terms for LEADTOOLS Document Imaging, LEADTOOLS Document Imaging Suite, LEADTOOLS Medical Imaging and LEADTOOLS Medical Imaging Suite require runtime licensing based on the number of copies of your application that you deploy (i.e., distribute or install and use internally).

By paying the initial box price for the applicable LEADTOOLS product, you have obtained a development license, which entitles you to develop your application and test it. Once completed, if you wish to distribute the application or deploy it internally on multiple machines, you are required to enter into a duplication and distribution agreement with LEAD. You have the ability to choose from several licensing options depending on your volume needs.

The product you are installing is a fully functional working version and includes support for all features in LEADTOOLS Document Imaging, LEADTOOLS Document Imaging Suite, LEADTOOLS Medical Imaging and LEADTOOLS Medical Imaging Suite. (Depending on which product you have licensed, some of the features may ultimately not be available to you. See the on-line help file for a product feature comparison.) Until you sign and return the correct licensing agreement, your application will display a "nag" message. Once LEAD receives the executed contract, we will provide you a password that will permit you to terminate the "nag" message for the product that you have licensed. In addition to providing the password, you must also use the no nag version of the LTKRN14n.dll, found in the REDIST\NONAGLTKRN directory. This is also the version you must redistribute.

Duplication and Distribution Agreements

Click this button to start the Licensing help file to review the License Agreements governing your use of the software.


Topic Selection

LEAD Technologies, Inc.
Suite 400
1201 Greenwood Cliff
Charlotte, NC 28204

Sales@Leadtools.com
www.leadtools.com

(704) 332-5532
FAX: (704) 372-8161
Tech Support: (704) 372-9681

LEADTOOLS is ideal for developers involved in still frame, multimedia, document, medical, and vector imaging projects, including Internet/Intranet applications. Independent of the specific application requirement – scanning, file format support/conversion, compression, image processing, annotation, database support, multimedia, etc. – LEADTOOLS provides the most comprehensive, robust, flexible, and powerful imaging solution available.

Click this button to start the Licensing help file to review the License Agreements governing your use of the software.

Click this button to start the Products help file to review the full line of LEADTOOLS Products.

Click this button to start the Imaging help file to review the full line of LEADTOOLS Image Categories.


.topic 0xdb2
 Barcode Modules
 The following Barcode Modules are available from LEAD. Please note (*) that each module requires runtime-licensing.
 LEADTOOLS 1D Symbols (read and write) $1195*
 LEADTOOLS 2D Code One (read) $1595*
 LEADTOOLS 2D Code One (write) $1395*
 LEADTOOLS 2D PDF417 (read) $1595*
 LEADTOOLS 2D PDF417 (write) $1395*


Read Options Dialog

The Read Options dialog is shown below:

This dialog contains the following major options:

1. | General Group:
 | a. | Symbol Types: Opens the drop-down list box, shown below, which is used to select the type of symbol to read.
 |  | - Bar Codes: Reads linear barcodes.
 |  | - PDF417: Reads PDF417 barcodes.
 |  | - Data Matrix: Reads Data Matrix barcodes.
 | b. | Multiple Max: Determines the maximum number of barcodes to find.
 | c. | Units: Determines the unit of measure for reading barcodes. The available units are shown below:

2. | Search Flags Group: Specifies the barcode sub-types for which to search and whether to search a region or an area.
 | The type selected in the Symbol Type drop-down list box determines what Search Flag options are available. These are displayed below for each symbol type:
 | Linear barcode | PDF417 | Data Matrix

 | To see the barcode sub-types for each major type, please refer to the image in the "Symbol Types" section above.
 | a. | Using the Region: Indicates whether to read barcodes in the region of the image or in the area defined by the Location Group options. When this is checked, the demo will read the barcodes within the region and all options in the Location Group will be disabled.
 | b. | Search All Types: Indicates whether to search for all barcode types. If this is checked, the individual types present in the Search Flags Group will be disabled.
 | c. | Individual barcode types: Indicates an individual type of barcode for which to search. These are disabled if the Search All Types option is checked.
3. | Location Group: Specifies the search area in which to find the barcodes. To specify the area, set the following members:
 | a. | StartX
 | b. | StartY
 | c. | Width
 | d. | Height
 | This area will be used only if the "Using the Region" option, under "Search Flags", is not checked.
4. | Direction Group: Specifies the direction of the search. These options will be used only with Linear and PDF417 barcodes.
5. | Options Group: Includes options used for reading Linear barcodes. These options include the following:
 | a. | Error Check Digit: Enables or disables the use of an error check digit while reading or writing a barcode.
 | b. | Minimum Length: Specifies the minimum length of a barcode string when searching for a non-fixed-length barcode.
 | c. | Granularity: Specifies the number of lines per column to skip when reading a barcode. The default value is 9. This means that every tenth line will be scanned when looking for a barcode. Scanning every line slows the process while skipping too many lines may skip a barcode.
 | d. | White Lines: Specifies the number of lines of white space above and below the barcode symbol.
6. | Colors Group: Specifies which colors, if any, to use when searching for barcodes. The following are the color options:
 | a. | Use Color: Enables reading barcodes with colors. If this is unchecked, the demo will use the default barcode color, BLACK, and the default space color, WHITE.
 | b. | Bar Color: Specifies the bar color to use when searching for barcodes. Barcodes that are not this color will not be found.
 | c. | Space Color: Specifies the space color to use when searching for barcodes. Barcodes that do not have spaces this color will not be found.
7. | OK button: Starts a barcode search of the image, using the read criteria set in this dialog. If the image contains any barcodes that match the read criteria, then the demo will display the number of barcodes found in a dialog box, and will display information for each barcode in a separate dialog box.
8. | Cancel button: Cancels the barcode search and closes the dialog.


Write Options Dialog

The Write Options dialog is shown below:

This dialog contains the following major options:

1. | General Group:
 | a. | Symbol Type: Opens the drop-down list box, shown below, which is used to select the type of symbol to write.
 |  | - Bar Codes: Reads linear barcodes.
 |  | - PDF417: Reads PDF417 barcodes.
 |  | - Data Matrix: Reads Data Matrix barcodes.
 |  | Note: The type selected in the Symbol Type drop-down list box determines what options are available throughout the rest of the dialog.
 | b. | Barcode Type: Specifies the barcode sub-type to write.
 | c. | Units: Determines the unit of measure for reading barcodes. The available units are shown below:
2. | Location Group: Specifies the area in which to write the barcode. To specify the area, set the following members:
 | a. | StartX
 | b. | StartY
 | c. | Width
 | d. | Height
 | This area will be used only if you didn’t select a region in the image. If you did select a region, then the demo will write the barcode within the region and ignore this area.

3. | Options Group: Contains flags that indicate whether to write an error check digit and the text for the barcode. For more information, please refer to the rest of the Barcode help file.
4. | Colors Group: Specifies colors that will be used for searching. The following are the color options:
 | a. | Use Color: Enables writing barcodes with colors. If this is unchecked, the demo will use the default barcode color, BLACK, and the default space color, WHITE to write the barcode.
 | b. | Transparent: Enables writing barcode with a transparent color. This option is not recommended because the written barcodes can’t be read with all images.
 | c. | Bar Color: Specifies the bar color to use when writing barcodes.
 | d. | Space Color: Specifies the space color to use when writing barcodes.
5. | Bar Code String Group: Specifies the barcode string to write.
6. | Justification Group: Specifies how to justify the barcode within the area. These options will be used only with PDF417 and Data Matrix barcodes. For more information about these options, please refer to the rest of the Barcode help file.
7. | Data Matrix Options Group: Contains options available only when writing Data Matrix barcodes. For more information on Data Matrix options, refer to the rest of the Barcode help file.
8. | PDF417 Options Group: Contains options available only when writing PDF417 barcodes. For more information on PDF417 options, refer to the rest of the Barcode help file.
9. | OK button: Writes a barcode over the image, using the write criteria set in this dialog.
10. | Cancel button: Cancels writing the barcode and closes the dialog.


Barcode

Barcode Modules

The following Barcode Modules are available from LEAD. Please note (*) that each module requires runtime-licensing.

LEADTOOLS 1D Symbols (read and write) $1195*

LEADTOOLS 2D Code One (read) $1595*

LEADTOOLS 2D Code One (write) $1395*

LEADTOOLS 2D PDF417 (read) $1595*

LEADTOOLS 2D PDF417 (write) $1395*