Programming with LEADTOOLS Barcode

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

image\sqrblit.gif Linear barcodes (1D)

image\sqrblit.gif PDF417 (2D)

image\sqrblit.gif Data Matrix (2D)

image\sqrblit.gif QR

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

Linear Barcodes

image\sqrblit.gif EAN 13

image\sqrblit.gif EAN 8

image\sqrblit.gif UPC A

image\sqrblit.gif Code 3 of 9

image\sqrblit.gif Code 128

image\sqrblit.gif Interleaved 2 of 5

image\sqrblit.gif CODABAR

image\sqrblit.gif UCCEAN 128

PDF Barcodes

image\sqrblit.gif PDF417

Data Matrix

image\sqrblit.gif BARCODE_DM_DEF

image\sqrblit.gif BARCODE_DM_10x10

image\sqrblit.gif BARCODE_DM_12x12

image\sqrblit.gif BARCODE_DM_14x14

image\sqrblit.gif BARCODE_DM_16x16

image\sqrblit.gif BARCODE_DM_18x18

image\sqrblit.gif BARCODE_DM_20x20

image\sqrblit.gif BARCODE_DM_22x22

image\sqrblit.gif BARCODE_DM_24x24

image\sqrblit.gif BARCODE_DM_26x26

image\sqrblit.gif BARCODE_DM_32x32

image\sqrblit.gif BARCODE_DM_36x36

image\sqrblit.gif BARCODE_DM_40x40

image\sqrblit.gif BARCODE_DM_44x44

image\sqrblit.gif BARCODE_DM_48x48

image\sqrblit.gif BARCODE_DM_52x52

image\sqrblit.gif BARCODE_DM_64x64

image\sqrblit.gif BARCODE_DM_72x72

image\sqrblit.gif BARCODE_DM_80x80

image\sqrblit.gif BARCODE_DM_88x88

image\sqrblit.gif BARCODE_DM_96x96

image\sqrblit.gif BARCODE_DM_104x104

image\sqrblit.gif BARCODE_DM_120x120

image\sqrblit.gif BARCODE_DM_132x132

image\sqrblit.gif BARCODE_DM_144x144

image\sqrblit.gif BARCODE_DM_8x18

image\sqrblit.gif BARCODE_DM_8x32

image\sqrblit.gif BARCODE_DM_12x26

image\sqrblit.gif BARCODE_DM_12x36

image\sqrblit.gif BARCODE_DM_16x36

image\sqrblit.gif BARCODE_DM_16x48

image\sqrblit.gif BARCODE_DM_WRITE_RECTANGLE

QR

image\sqrblit.gif BARCODE_QR_DEF

image\sqrblit.gif BARCODE_QR_M2_1

image\sqrblit.gif BARCODE_QR_M2_2

image\sqrblit.gif BARCODE_QR_M2_3

image\sqrblit.gif BARCODE_QR_M2_4

image\sqrblit.gif BARCODE_QR_M2_5

image\sqrblit.gif BARCODE_QR_M2_6

image\sqrblit.gif BARCODE_QR_M2_7

image\sqrblit.gif BARCODE_QR_M2_8

image\sqrblit.gif BARCODE_QR_M2_9

image\sqrblit.gif BARCODE_QR_M2_10

image\sqrblit.gif BARCODE_QR_M2_11

image\sqrblit.gif BARCODE_QR_M2_12

image\sqrblit.gif BARCODE_QR_M2_13

image\sqrblit.gif BARCODE_QR_M2_14

image\sqrblit.gif BARCODE_QR_M2_15

image\sqrblit.gif BARCODE_QR_M2_16

image\sqrblit.gif BARCODE_QR_M2_17

image\sqrblit.gif BARCODE_QR_M2_18

image\sqrblit.gif BARCODE_QR_M2_19

image\sqrblit.gif BARCODE_QR_M2_20

image\sqrblit.gif BARCODE_QR_M2_21

image\sqrblit.gif BARCODE_QR_M2_22

image\sqrblit.gif BARCODE_QR_M2_23

image\sqrblit.gif BARCODE_QR_M2_24

image\sqrblit.gif BARCODE_QR_M2_25

image\sqrblit.gif BARCODE_QR_M2_26

image\sqrblit.gif BARCODE_QR_M2_27

image\sqrblit.gif BARCODE_QR_M2_28

image\sqrblit.gif BARCODE_QR_M2_29

image\sqrblit.gif BARCODE_QR_M2_30

image\sqrblit.gif BARCODE_QR_M2_31

image\sqrblit.gif BARCODE_QR_M2_32

image\sqrblit.gif BARCODE_QR_M2_33

image\sqrblit.gif BARCODE_QR_M2_34

image\sqrblit.gif BARCODE_QR_M2_35

image\sqrblit.gif BARCODE_QR_M2_36

image\sqrblit.gif BARCODE_QR_M2_37

image\sqrblit.gif BARCODE_QR_M2_38

image\sqrblit.gif BARCODE_QR_M2_39

image\sqrblit.gif BARCODE_QR_M2_40

image\sqrblit.gif BARCODE_QR_M1_1

image\sqrblit.gif BARCODE_QR_M1_2

image\sqrblit.gif BARCODE_QR_M1_3

image\sqrblit.gif BARCODE_QR_M1_4

image\sqrblit.gif BARCODE_QR_M1_5

image\sqrblit.gif BARCODE_QR_M1_6

image\sqrblit.gif BARCODE_QR_M1_7

image\sqrblit.gif BARCODE_QR_M1_8

image\sqrblit.gif BARCODE_QR_M1_9

image\sqrblit.gif BARCODE_QR_M1_10

image\sqrblit.gif BARCODE_QR_M1_11

image\sqrblit.gif BARCODE_QR_M1_12

image\sqrblit.gif BARCODE_QR_M1_13

image\sqrblit.gif BARCODE_QR_M1_14

image\sqrblit.gif 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.