RAztecCodeX is an ActiveX control developed using Visual Basic 6.0 and will allow you to create 2 dimensional AztecCode barcodes for your windows applications.
Aztec Code is a 2D matrix symbology made up of square modules on a square grid, with a square bullseye pattern at their center. Aztec Code symbols can encode large amounts of data with user defined error correction level.
The smallest format can encode 13 numeric , 12 alphabetic characters or 6 bytes of data, while the largest format can encode 3832 numeric ,3067 alphabetic characters or 1914 bytes of data.
available formats are:
Rows / columns (number of modules/squares) |
Capacity (digits)
|
Capacity (text)
|
Capacity (binary data)
|
CONFIGURATION_15X15_COMPACT |
13
|
12
|
6
|
CONFIGURATION_19X19 |
18
|
15
|
8
|
CONFIGURATION_19X19_COMPACT |
40
|
33
|
19
|
CONFIGURATION_23X23 |
49
|
40
|
24
|
CONFIGURATION_23X23_COMPACT |
70
|
57
|
33
|
CONFIGURATION_27X27 |
84
|
68
|
40
|
CONFIGURATION_27X27_COMPACT |
110
|
89
|
53
|
CONFIGURATION_31X31 |
128
|
104
|
62
|
CONFIGURATION_37X37 |
178
|
144
|
87
|
CONFIGURATION_41X41 |
232
|
187
|
114
|
CONFIGURATION_45X45 |
294
|
236
|
145
|
CONFIGURATION_49X49 |
362
|
291
|
179
|
CONFIGURATION_53X53 |
433
|
348
|
214
|
CONFIGURATION_57X57 |
516
|
414
|
256
|
CONFIGURATION_61X61 |
601
|
482
|
298
|
CONFIGURATION_67X67 |
691
|
554
|
343
|
CONFIGURATION_71X71 |
793
|
636
|
394
|
CONFIGURATION_75X75 |
896
|
896
|
446
|
CONFIGURATION_79X79 |
1008
|
808
|
502
|
CONFIGURATION_83X83 |
1123
|
900
|
559
|
CONFIGURATION_87X87 |
1246
|
998
|
621
|
CONFIGURATION_91X91 |
1378
|
1104
|
687
|
CONFIGURATION_95X95 |
1511
|
1210
|
753
|
CONFIGURATION_101X101 |
1653
|
1324
|
824
|
CONFIGURATION_105X105 |
1801
|
1442
|
898
|
CONFIGURATION_109X109 |
1956
|
1566
|
976
|
CONFIGURATION_113X113 |
2216
|
1694
|
1056
|
CONFIGURATION_117X117 |
2281
|
1826
|
1138
|
CONFIGURATION_121X121 |
2452
|
1963
|
1224
|
CONFIGURATION_125X125 |
2632
|
2107
|
1314
|
CONFIGURATION_131X131 |
2818
|
2256
|
1407
|
CONFIGURATION_135X135 |
3007
|
2407
|
1501
|
CONFIGURATION_139X139 |
3205
|
2565
|
1600
|
CONFIGURATION_143X143 |
3409
|
2728
|
1702
|
CONFIGURATION_147X147 |
3616
|
2894
|
1806
|
CONFIGURATION_151X151 |
3832
|
3067
|
1914
|
Compact formats can be used to encode short messages in a more efficient manner than full range formats. Note that reader/decoder can autodiscrimanate between both formats.
There are also a set of 256 special formats called "Aztec runes" which can be used for encoding values 0 to 255 for special applications.
RAztecCode supports:
After unzipping the file you have received or downloaded, the activeX needs to be registered in your windows environment by executing the install.bat file. On windows 7 you must right click the bat file and run it as administrator.
If you want to deinstall the OCX you can do it by means of uninstall.bat.
Boths programs just run the regsvr32.exe windows tool in order to register and unregister OCX's.
The ActiveX has been developed using Visual Basic 6.0. For this reason it needs the following files:
Visual Basic
In the "Examples" subdirectory you will find a visual basic 6.0 project you can use to test the ActiveX. The project is already compiled, you can execute it by means of AztecCodeExample.exe.
The ActiveX can be inserted into your MSAccess forms and reports. If want to retrieve a value from the database before you create the barcode you can do it this way:
The ActiveX can also be used in your web applications when you use ASP. The following code shows how this can be done:
<%@ LANGUAGE="VBSCRIPT" %>
<%set bc=server.CreateObject("J4LAztecX.RAztecX")
bc.standalone=true
bc.ModuleSize=3bc.ProcessTilde = True
bc.ErrorCorrectionLevel = 23
' CONFIGURATION_ANY = 0
' CONFIGURATION_COMPACT = 1
' CONFIGURATION_FULL = 2
bc.ConfigurationType =0' CONFIGURATION_15X15_COMPACT = 0
' CONFIGURATION_19X19 = 1
' CONFIGURATION_19X19_COMPACT = 2
' CONFIGURATION_23X23 = 3
' CONFIGURATION_23X23_COMPACT = 4
' CONFIGURATION_27X27 = 5
' CONFIGURATION_27X27_COMPACT = 6
' CONFIGURATION_31X31 = 7
' CONFIGURATION_37X37 = 8
' CONFIGURATION_41X41 = 9
' CONFIGURATION_45X45 = 10
' CONFIGURATION_49X49 = 11
' CONFIGURATION_53X53 = 12
' CONFIGURATION_57X57 = 13
' CONFIGURATION_61X61 = 14
' CONFIGURATION_67X67 = 15
' CONFIGURATION_71X71 = 16
' CONFIGURATION_75X75 = 17
' CONFIGURATION_79X79 = 18
' CONFIGURATION_83X83 = 19
' CONFIGURATION_87X87 = 20
' CONFIGURATION_91X91 = 21
' CONFIGURATION_95X95 = 22
' CONFIGURATION_101X101 = 23
' CONFIGURATION_105X105 = 24
' CONFIGURATION_109X109 = 25
' CONFIGURATION_113X113 = 26
' CONFIGURATION_117X117 = 27
' CONFIGURATION_121X121 = 28
' CONFIGURATION_125X125 = 29
' CONFIGURATION_131X131 = 30
' CONFIGURATION_135X135 = 31
' CONFIGURATION_139X139 = 32
' CONFIGURATION_143X143 = 33
' CONFIGURATION_147X147 = 34
' CONFIGURATION_151X151 = 35
bc.PreferredConfiguration = 0
' structured append
' bc.FileId="ABC"
' bc.StructuredAppend = true
' bc.StructuredAppendCounter = 2
' bc.StructuredAppendIndex = 1
bc.Redraw = Truebc.autoconfigurate=true
bc.code="AZTEC TEST"
bc.setSize 3000,3000
bc.saveToBMP("c:\inetpub\wwwroot\barcode")
set bc=nothing<HTML>
<BODY>
RBARCODEX<BR>
<img src="barcode.bmp">
</BODY>
</HTML>
this script uses RAztecX in order to create a bmp image that can be display in the browser. If you want to use another format (not BMP) you can use external tools for the conversion. The following example uses the JanGraphics freeware library to convert the bmp to a png file:
<%@ LANGUAGE="VBSCRIPT" %>
<%set bc=server.CreateObject("J4LAztecX.RAztecX")
...... ' like previous example
set bc=nothingset conv=createobject("janGraphics.Compendium")
conv.convert "c:\inetpub\wwwroot\barcode.bmp","c:\inetpub\wwwroot\barcode.png"
set conv=nothing
%>
Warnning:
In some environments you can get the following error:
Microsoft VBScript runtime (0x800A01FB)
An exception occurred: saveToBMP()
this error is produced by a Bug in the file MSVBVM60.dll. We advise you to use version 6.00.0092.0037 , if you cannot get it, contact us and we will send you the correct version.
Methods
- paintBarcode(): forces the barcode to be repainted.
- saveToBMP(filename): saves the barcodes to a BMP file.
Properties
- autoConfigurate: if true the preferredConfiguration can be ignored if the data does not fit.
- backColor: background color.
- barColor: foreground color (color of the bars).
- code: string to be encoded.
- CodeBinary: value to be encoded (as an array of Integer values). It will be used only if the property useBinary is true. Example of use:
[VB6]
Dim B() As Integer
ReDim B(0 To 2) ' encode 3 bytes
B(0) = 65
B(1) = 65
B(2) = 65
bc. CodeBinary = B
bc.useBinary = True
....
- configurationType: use this property to define which formats can be used: CONFIGURATION_ANY (any), CONFIGURATION_COMPACT (only compact formats) or CONFIGURATION_FULL (only full range formats).
- errorCorrectionLevel: percentage of errors which can be recovered (default is 23, 23%)
- encoding: encoding mode (default is NORMAL). Value values are:
- NORMAL: can encode any character but it is not very efficient encoding binary values (values above 128).
- BINARY: use this mode only if your data contains many bytes/characters above 128.
- margin: left and top margin in pixels (default is 30).
- moduleSize: number of pixels which make a module (square) in the barcode (default is 4).
- paintedWidth (readonly): real size of the barcode. The value is set after the barcode is painted. Can be use to create an image of the exact size.
- paintedHeight (readonly): real size of the barcode. Can be use to create an image of the exact size.
- preferredConfiguration: preferred format. Another format will be automatically selected if AutoConfigurate=true and the amount of data and the selected error correction level does not fit in the preferred format. Valid values are CONFIGURATION_15X15_COMPACT, CONFIGURATION_19X19 .... and so on (see table).
- processTilde: if true (default) the tilde character (~) will be processed like this:
- ~~: will be replaced with ~
- ~dxxx: will be replaced by the character whose ascii code is xxx. For example ~d065 will be replaced with A.
- ~F: will be replaced with the FNC1 flag (allowed as first codeword only).
- ~Exxxxxx: will be replaced with the Extended Interpretation Channel flag xxxxxx. For example to activate Extended Interpretation Channel 1, use ~E000001.
- readerInitialization: if true the reader initialization flag will be set.
- Redraw: set it to true to force a repaint of the barcode
- rune: set a value between 0 and 255 to create a Aztec code rune (default is -1, disabled)
- SetSize(width ,height) : size of the barcode image (for exporting). The units for the width and height parameters are twips.
- Standalone: set it to true in asp or vbs files.
- useBinary: set it to true in order to encode the content of the codeBinary property.
Structured Append properties
- structuredAppend: if true, the structured append mode is enabled (default is false).
- StructuredAppendCounter: number of symbols which make the sequence.
- StructuredAppendIndex: position of current symbol within the secuence (starting at 0).
- FileID: file identifier for structured append (recommended to use uppercase characters only).