Aztec Font & Encoder User Manual
- Implementation Options
- Font Specifications
- Windows Installation Overview
- Aztec Generator Application
Buy License Support Download Demo Release Log
Implementation Tutorials
To view the Implementation tutorials, navigate to the appropriate Font or Graphic Encoder from the link provided in the table.
DEMO NOTICE:
The demo version of this product will produce larger symbols because
the text of "DEMO<CR><LF>" is encoded in each symbol with the data that
is being encoded. The
purchased version
does not include these restrictions.
Aztec Implementation Options
In the event the font encoders and graphic encoders provided are not supported in the desired application, other implementation options are available:
- Aztec may be printed on an unsupported system by using a font encoder to populate a database with the "text string to print" and by accessing the database from the other system with the Aztec font.
- The source code for any single encoder may be provided by request after the purchase of an Unlimited Developer License of the Font and Encoder Suite.
- IDAutomation Image Generators create images one at a time on Windows systems with command-line options.
Windows Installation Overview
Extract the file(s) provided with the product and run the installation executable. The installation executable will install the files needed in the application folder under Program Files and the following components:
- Aztec Generator Application - An application that provides an easy method for users to create Aztec barcodes and print or paste them into other applications.
- Excel Font Encoder App - Generates barcodes in Excel Forms.
- TrueType Font - The IDAutomation2D font used to create Aztec symbols.
- Crystal Reports Font Formula - Compatible with versions 9 and above.
- ActiveX Control - A graphic encoder for use in Access, Excel, Visual Basic, Visual FoxPro, and C++.
- Windows DLL - This component is installed in the Windows System32 folder and is used as the font encoder for Windows applications.
- Signed ActiveX CAB File - The CAB file may be used with InfoPath, Internet Explorer, and FrontPage.
- VBA Module - The module may be used in Visual Basic, Excel, or Access.
- Microsoft Office Examples are provided
for Word mail-merge and
Access.
Importing the VBA Module into VB, Excel, or Access
The VBA module is required when using the font encoders in VB 6, Excel, or Access. The IDAutomation_Aztec_Macro.bas module creates symbols quickly by using the already installed ActiveX DLL for the font encoder functionality.
Importing the module:
- Extract the files provided with the product.
- Open VB, Excel, or Access.
- If Excel or Access is being used, choose Tools - Macro - Visual Basic Editor to open the VB editor.
- Run the installation executable in the package and go to Tools - References and select IDAutomation Aztec Barcode, click OK.
- Choose File - Import File and select the module to import from the VBA folder of the extracted files.
- If Excel or Access is being used, choose File - Close to close the VB editor and choose File - Save.
- After the file is imported, the IDAutomation_Aztec function may
be called according to the chart below. The zero digit is the default for all parameters (which are optional) and is used for automatic mode or a false setting. The one digit is used for a true setting.
idautomation_aztec_macro.bas EncAztec(DataToEncode As String,
Optional ProcessTilde, Optional Error Correction)Example:
=EncAztec([Test Data.data])
or
=EncAztec([Test Data.data],1,15)
Microsoft Access Implementation
- Run the installation executable file in the package and follow the instructions to complete the installation.
- Import the VBA module into the database.
- Open a report in Design Mode.
- Add a text field to the report that is to contain the barcode. Size it appropriately, to be large enough to contain the symbol. Change the font point size of the field to 8 points.
- Right-click on the text field and enter the function call as a formula in the control source property. For example:
=EncAztec([Test Data.data]) - Save the report and run it; several letters should appear in the text field. This is the data that will create a correct barcode when combined with the 2D font.
- Open the report in design mode and select the IDAutomation2D font for the text field. The recommended point size is 8 points.
- Save the report and run it; a correct symbol should appear in the text field.
Word Mail-Merge Implementation
Aztec barcodes may be created in a Word mail merge if Excel is used as the data source with the following procedure:
- Extract the files provided with the product.
- Run the installation executable in the package to install the IDAutomation2D font.
- Import the VBA module into the Excel spreadsheet that will be used as the data source.
- Place a title in each column of the spreadsheet on row 1 that will contain the data, and then import the data into the Excel spreadsheet.
- Select a blank column on row 1, to the right of the last populated column in the spreadsheet, and title it Barcode.
- Add a formula on row 2 of the Barcode column that calls the function as a formula.
For example, the following formula adds columns A and B to the barcode:
=EncAztec(A2&B2)
The following formula adds columns A, B, and C to the barcode and separates them with a comma delimiter:
=EncAztec(A2&","&B2&","&C2) - Highlight the cell with the formula in it and choose Edit - Copy.
- Select the entire range of cells to paste this formula into the Barcode column and choose Edit - Paste.
- Follow the procedures in Word to add this spreadsheet as the data source for the mail merge.
- Add the mail merge field of Barcode to place the barcode in the document.
- Highlight the «Barcode» merge field and select the IDAutomation2D font.
- After the mail merge is performed, the barcodes should appear in the merged documents.
- A working example is provided in the Word Mail-Merge.doc file included with the install package.
Crystal Reports UFL Integration
Limitations with Crystal Reports before Version 9:
The Crystal Reports UFL is a legacy product. It is recommended to use the included font formula instead of the UFL if possible.
Crystal Reports overcomes the 254-character limitation when using a UFL with a formula that can retrieve the data encoded in 254-byte chunks. A simple example of creating an Aztec barcode in Crystal is included in the Font and Encoder package. IDAutomation recommends referring to that example if problems are encountered.
How the UFL works with Crystal Reports:
After installing the Aztec Font and Encoder package, the encoder functions will be available in Crystal Reports.
- The IDAutomationAztecEncoderAztecSet function returns the number of data segments contained in the barcode and sets up the barcode for retrieval. All fields passed to the encoder set function must be text fields or they must be converted to text.
- The IDAutomationAztecEncoderAztecGet function returns a string for the designated data segment. A correct barcode string is achieved when all data segments are combined.
- When the resulting string is combined with IDAutomation's 2D font, it will produce an Aztec barcode.
How to Create an Aztec Barcode in Crystal Reports:
- Choose View - Field Explorer. Select Formula Fields. Right-click and select New. Enter a name to identify the formula created and choose OK.
- The Formula Editor should now appear.
- Copy and paste the code below into the Formula Editor dialog box. The Crystal Reports Example.rpt
file is provided in this package as an example and may be referred
to for troubleshooting purposes:
stringVar DataToEncode:= {Table1.Field1};
stringVar CompleteBarcodeString:="";
numberVar i:=0;
numberVar Segments:= IDAutomationAztecEncoderAztecSet(DataToEncode,0,0);
For i:=0 to Segments Do
(
CompleteBarcodeString := CompleteBarcodeString + IDAutomationAztecEncoderAztecGet(i);
);
CompleteBarcodeString
- Copy and paste the code below into the Formula Editor dialog box. The Crystal Reports Example.rpt
file is provided in this package as an example and may be referred
to for troubleshooting purposes:
- Change the DataToEncode = section of the formula so it encodes fields from a database. Save the formula.
- The field where the barcode is to be placed on the report must allow multiple lines because the formula draws the symbol line-by-line. Format the field so that all borders are removed; borders will usually cause scanning problems. Size the field so that it is large enough to contain the barcode.
- Choose File - Print Preview or the Preview tab. A series of many characters will be visible in the text field; this is normal.
- After the font of the field is changed to the Aztec Font (IDAutomation2D) a correct symbol will be created.
Encoder Parameters: |
Number of Segments = IDAutomationAztecEncoderAztecSet (DataToEncode As String, ProcessTilde, Error Correction) |
There are several ways to encode data in Aztec symbols with Crystal, such as combining multiple fields in a single symbol. A common method is to enable ProcessTilde and use ~d009 for a tab and ~d013 for a return. For example:
- The following formula combines two fields in a single barcode and
places a tab function between them:
stringVar DataToEncode:= {Table1.DataField1} & "~d009" & {Table1.DataField2}; - The formula below combines two fields with the date function:
stringVar DataToEncode:= {Table1.DataField1} & "~d009" & {Table1.DataField2} & "~d013" & CurrentDate;
Refer to the Crystal Reports documentation for additional information about creating reports with formulas.
Microsoft .NET Integration
.NET Font Encoder Example:
The following example uses the font encoder to obtain the text data, that when printed with the IDAutomation2D font will create a correct symbol:
- In a .NET project, add a reference to the DLL and place the import
statement in the declarations section of the project:
Imports IDAutomation.Windows.Forms.AztecBarcode
- Obtain the string of data, that when printed with the IDAutomation2D
font, will create a correct symbol:
Dim NewBarcode As AztecBarcode
= New AztecBarcode()
TextBox2.Text = NewBarcode.FontEncoder(TextBox1.Text, 0, 0, "")
C# Example:
- In a .NET project, add a reference to the DLL and place the using statement
in the declarations section of the project. For example:
using IDAutomation.Windows.Forms.AztecBarcode;
- Obtain the string of data, that when printed with the
IDAutomation2D Font, will create a correct symbol:
AztecBarcode NewBarcode = new AztecBarcode();
textBox2.Text = NewBarcode.FontEncode(textBox1.Text, false, 0, false);
Encoder Parameters |
Result=(DataToEncode as String, ProcessTilde, Error Correction as Integer, Read Initialization As String) |
Using the Windows DLL Font Encoder
Install the Font and Encoder for Windows by running the EXE file provided in the package. Upon execution, it installs TrueType fonts and implementation examples and registers the IDAutomationAztec.DLL COM DLL. After the DLL is installed and registered, it may be accessed by any application that can retrieve a text string or graphic object from a COM DLL.
When using the DLL as an ActiveX graphic encoder, refer to the instructions in the ActiveX Control Manual. When using the DLL as a font encoder, the FontEncode function is used to convert the data to encode into a string, that when combined with the 2D font, will create a correct barcode. The following is Visual Basic 6 code that places the result in the "PrintableBarcodeString" variable:
DataToEncode = InputString.Text
Dim DMFontEncoder As AZTLib.Aztec
Set DMFontEncoder = New Aztec
DMFontEncoder.FontEncode DataToEncode, 0, 0, "", Printable_string
PrintableBarcodeString = Printable_string
ActiveX Encoder Parameters |
DataToEncode, ProcessTilde, Error Correction as Integer, Read Initialization As String, Result |
A Visual Basic project example is included with the package. These files are placed in the destination directory upon installation.
Java Integration
The Java class file was compiled with the Sun JDK 1.3 and is compatible with Windows, MAC, Unix, and Linux. Copy the class file from the "Java Class Encoder" folder to the system's classpath in the folder \com\idautomation\fontencoder\aztec. Consult the Java documentation or the company that provides the Java virtual machine for assistance.
Integrate the fontEncode Method:
After the directories are copied to the classpath root, the method to format data to the font can then be called from a method in a Java application as in this example:
import java.io.*;
import com.idautomation.fontencoder.aztec.*;
class AztecBarcodeExample {
public static void main(String[] args) {
String dataToEncode = "Aztec Test";
AztecEncoder azt = new AztecEncoder();
System.out.println(azt.fontEncode(dataToEncode));
}
}
The data string returned by the fontEncode method will create a proper symbol when printed with the 2D font.
Support
The following support issues are links to the appropriate section of the Data Matrix Encoder manual because the issue resolutions are the same:
- Font Installation Procedures
- Line Spacing Issues with PCL Fonts
- X Axis Issues and Left Margin Alignment
- Encoding Extended ASCII Characters
- Microsoft Excel Compatibility
- Intelligent Positioning Drive Implementation
- Encode Aztec Barcodes using VBA in Excel
- Support for all graphic encoders is provided in the online manual for that product.
- Additional support may be provided at the
Support Site, by
reviewing
resolved forum threads or
contacting
IDAutomation.
When ProcessTilde is equal to "1" (the default is "0") the following tilde options are available:
-
~dNNN: Represents the ASCII character encoded by the 3-digit NNN. For example, ~d009 represents a tab, ~d013 represents a return and ~d065 represents the character 'A'.
-
~1: Represents the character FNC1.
Error Correction:
The Reed Solomon error correction level encoded in the symbol is specified as a value from 5 to 95. More error correction creates a larger symbol that can withstand more damage. It is not recommended to use error correction over 23 with large amounts of data, because this may overload the symbol capacity. The default setting of 0 performs the automatic and recommended selection, which is a value of 23.