MaxiCode Font & Encoder User Manual

Buy License Support Download Demo Release Log

Specifications and Support

If a barcode scanner is needed to read or verify MaxiCode barcodes for testing, please consider these 2D Barcode Scanners and Imagers.

MaxiCode Font and Encoder Package Overview

Extract the files provided with the product and run the installation executable to install the files needed in the application folder under Program Files. The following items are included in the package:

  1. MaxiCode Encoder provides an easy method for users to create MaxiCode barcodes and print or paste them into other applications.
  2. TrueType Font is named "IDAutomation Maxicode" and should be printed at 6 points.
  3. Crystal Reports UFL allows use of the MaxiCode fonts from Crystal Reports, compatible with version 9 and above.
  4. ActiveX Control is a graphic encoder for use in Access, Excel, Visual Basic and C++.
  5. Windows DLL is installed in the Windows System32 folder and is used as the font encoder for Windows applications.
  6. Signed ActiveX CAB File may be used with InfoPath, Internet Explorer and FrontPage.
  7. VBA Module may be used in Visual Basic, Excel or Access.
  8. Visual Basic Source Code used to create the MaxiCode Font and Encoder for Windows is also supplied.
  9. Microsoft Office Examples are provided for Word mail-merge and Access. To generate barcodes in Excel or Access, consider using the ActiveX Control or Word Mail-Merge.

Importing the VBA Module into VB, Excel or Access

The VBA module is required when using font encoders in VB 6. The module that accesses the ActiveX DLL for the encoder function is IDAutomation_Maxicode_Macro.bas. The installation executable provided in the package should be installed on each computer using this module for proper operation.

Importing the Module
  1. Extract the files provided with the product.
  2. Open VB, Excel or Access.
  3. If Excel or Access is being used, select Tools - Macro - Visual Basic Editor to open the VB editor.
  4. If the IDAutomation_Maxicode_Macro.bas module should be imported, run the installation executable first. In the Visual Basic Editor, select File - Import File, browse to the Program Files/ MaxiCode Font and Encoder folder and select the .bas file.
    - In the Visual Basic Editor, if the Project Explorer is not on the left-hand side, click on View, and select Project Explorer.
    - Expand the Modules folder and double click on IDAutomation_Maxicode_Macro
    - Go to Tools - References and select IDAutomation MaxiCode, click OK.
  5. If Excel or Access is being used, choose File - Close to close the VB editor and choose File - Save.
  6. After the file is imported, the EncMC function may be called according to the chart below.
    EncMC(DataToEncode as String, Optional EncodingMode as Int)
    The default Encoding Mode is 2

Microsoft Access Implementation

When MaxiCode fonts are used in reports and forms, the graphic encoder option may be the easiest product to use.

Graphic Encoder Implementation
  1. Run the installation executable in the package and follow the instructions to complete the installation.
  2. Open a report in Design Mode.
  3. Select Insert - ActiveX control and choose the IDAutomation MaxiCode control.
  4. Move and size the control as necessary. To change the properties of the control such as height and symbology type, right-click on the control and choose Properties.
  5. To bind the control to a data source, enter the table and field or formula in the control source field. The proper barcode will show up after the report is saved and executed. It is a good idea to ensure that the data is properly formatted when encoding MaxiCode symbols for UPS.

Other options for MaxiCode font implementation in Access using a graphic encoder are provided in the ActiveX Barcode Control Manual.

Font Implementation
  1. Run the installation executable file in the package and follow the instructions to complete the installation.
  2. Import the VBA module into the database.
  3. Open a report in Design Mode.
  4. Add a text field to the report that will contain the barcode. Size it appropriately, to be large enough to contain the symbol. Change the font point size of the field to 6 points.
  5. Right-click on the text field and enter the function call as a formula in the control source property. IDAutomation recommends encoding the data using tilde commands to format RS, GS and EOT functions with the "&" symbol to combine multiple fields and static text. For example:
    =EncMC("[)>~03001~02996" & [] & "~029840~029002~029" & [table1.track_num] & ... )
  6. 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 MaxiCode Font.
  7. Open the report in design mode and select the IDAutomation MaxiCode Font at 6 points for the text field.
  8. Save the report and run it; a correct symbol should appear in the text field.

Word Mail-Merge Implementation

MaxiCode barcodes may be created from fonts in Word mail-merge with the following procedure, when Excel is used as the data source:

  1. Extract the files provided with the product.
  2. When using Windows, run the installation executable in the package to install the IDAutomation Maxicode font. Macintosh users should follow the Mac Font Installation Procedures to install the IDAutomation Maxicode font.
  3. Import the VBA module into the Excel spreadsheet that will be used as the data source.
  4. 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.
  5. Select a blank column on row 1, to the right of the last populated column in the spreadsheet, and title it Barcode.
  6. 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:
    • Ensure that the data is properly formatted when encoding MaxiCode symbols for UPS.
  7. Highlight the cell with the formula in it and select Edit - Copy.
  8. Select the entire range of cells to paste this formula into in the Barcode column and choose Edit - Paste.
  9. Follow the procedures in Word to add this spreadsheet as the data source the mail merge.
  10. Add the mail merge field of Barcode to place the barcode in the document.
  11. Highlight the «Barcode» merge field and select the IDAutomation Maxicode font.
  12. After the mail-merge is performed, the barcodes should appear in the merged documents.
  13. A working example is provided in the Word Mail-Merge.doc file included with the install package.

Crystal Reports Integration

IDAutomation provides a high-speed Crystal UFL for the font encoder function. When distributing the report, both the ActiveX DLL and the Crystal DLL must be installed and registered.

How the Font and Encoder Works with Crystal Reports

After installing the MaxiCode Font and Encoder, the encoder functions will be available in Crystal Reports.

  1. The IDAutomationMCMaxiCodeEncoderMCSet 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.
  2. The IDAutomationMCMaxiCodeEncoderMCGet function returns a string for the designated data segment. A correct barcode string is achieved when all data segments are combined.
  3. When the barcode string is combined with IDAutomation's MaxiCode font at 6 points, it will produce a readable MaxiCode symbol.
How to Create a MaxiCode Barcode with Crystal Reports
  1. Open Crystal Reports 9 or greater. Versions prior to 9 are not compatible with the MaxiCode UFL.
  2. Choose View - Field Explorer. Select Formula Fields. Right click and select New. Enter a name to identify the formula created and choose OK.
  3. 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:= IDAutomationMCMaxiCodeEncoderMCSet(DataToEncode,2);
      For i:=0 to Segments Do
          CompleteBarcodeString := CompleteBarcodeString + IDAutomationMCMaxiCodeEncoderMCGet(i);
  4. Change the DataToEncode = section of the formula so it encodes fields from a database. While there are a number of ways to format encoded MaxiCode data, IDAutomation suggests using tilde commands to format RS, GS and EOT functions with the "&" symbol to combine multiple fields and static text. For example:
    stringVar DataToEncode:= "[)>~03001~02996" & {} & "~029840~029002~029" & {table1.track_num}...";
  5. The field where the barcode will live 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, as borders will usually cause scanning problems. Size the field so that it is large enough to contain the barcode.
  6. Choose File - Print Preview or the Preview tab. A series of many characters will be visible in the text field; this is normal.
  7. After the font of the field is changed to the MaxiCode Font (IDAutomation Maxicode) at 6 points, a correct symbol will be created.

ActiveX COM DLL Font Encoder

Install the Font and Encoder by running the .exe file provided in the package. Upon execution, this file installs the TrueType font, implementation examples and registers the Crystal and ActiveX DLLs. To register the DLL manually, perform the following:

  1. Copy the DLL to the \System directory.
  2. Register the DLL by going to the command prompt, change to the \system directory, and type the following command:
      REGSVR32 "IDAutomationMaxicode.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 COM DLL as a graphic encoder, refer to the instructions in the ActiveX Barcode Control User Manual. When using the COM DLL as a font encoder, the FontEncode function is used to convert the data to encode into a string, that when combined with the MaxiCode font, will create a correct barcode. The following is Visual Basic 6 code that places the result in the "PrintableBarcodeString" variable:

Dim MCFontEncoder As IDAMaxicode2Lib.IDAMaxicode
Set MCFontEncoder = New IDAMaxicode
MCFontEncoder.FontEncode DataToEncode, EncodingMode, PrintableBarcodeString

A Visual Basic project example is included with the package. These files are placed in the destination directory upon installation.

ActiveX Encoder Parameters
FontEncode (BSTR DataToEncode, int EncodingMode, BSTR *ReturnVal)
ActiveX Encoder Advanced Parameters
FontEncodeAdvanced (BSTR DataToEncode, int ApplyTilde, int EncodingMode, BSTR Country, BSTR ServiceClass, BSTR ZipCode, BSTR *ReturnVal)

NOTE: Generally FontEncodeAdvanced is not necessary because when the DataToEncode begins with [)>~, the Country, ServiceClass and ZipCode are automatically populated.

Java Encoder Integration

The Java class file was compiled with the Sun JDK 1.3 and is compatible with Windows, Mac, Unix, Linux and other systems supporting the Java Virtual Machine. To enable the encoder class library, copy the jar file in the package to the system's classpath. Consult the Java documentation or the organization that provides the Java virtual machine for assistance.

Integrate the FontEncode Method

After the directories are copied to the classpath root, the method of formatting data to UPS specifications to the font can then be called from a method in a Java application as in this example:

import com.idautomation.fontencoder.maxicode.*;
public class MaxiCodeTest
    public static void main(String[] args)
        char GS = (char) 29;
        char RS = (char) 30;
        char EOT = (char) 4;
        String dataToEncode = "[)>" + RS + "01" + GS + "96336091062" + GS +
            "840" + GS + "002" + GS + "1Z14647438"
        + GS + "UPSN" + GS + "410E1W" + GS + "195" + GS + GS + "1/1" + GS + GS + "Y" + GS + "135Lightner"
        + GS + "TAMPA" + GS + "FL" + RS + EOT;
        MaxiCode mce = new MaxiCode();

The data string returned by the fontEncode method will create a proper symbol when combined with the MaxiCode font.

To install the font on an operating system, consult the OS documentation or follow these font installation procedures.

Unique formatting is required to encode MaxiCode symbols for UPS, and the output should be always be checked for encoded data verification, symbol quality and bull's eye size. The following methods are provided:


boolean getProcessTilde()
void setProcessTilde(boolean pt)


void setMode(int m)
int getMode()

Zip Code:

void setZipCode(String zp)
String getZipCode()

Service Class:

void setServiceClass(String s)
String getServiceClass()


void setCountry(String c)
String getCountry()

Data To Encode:

void setData(String d)
String getData()

Number of Codes:

setNumberOfCodes(int n)
void fontEncode(String DataToEncode)

MaxiCode Barcode Support and Troubleshooting

While the below issues may relate to troubleshooting and support for the Data Matrix Font and Encoder Packages, the resolutions are identical to MaxiCode and thus can be used.

Alternative Implementation Options

In the event that the font encoders and graphic encoders included in the package are not supported in the desired application, consider the following options for integration.

  • MaxiCode may be printed on an unsupported system by using a font encoder on a supported system to populate a database with the "text string to print," then by accessing the database from the unsupported system, which will have the font installed.
  • The source code for any single encoder may be provided by request after the purchase of an Unlimited Developer License.
  • The IDAutomation Barcode Label Software Pro is a stand-alone label design application with VB scripting support and database connectivity.
  • IDAutomation Image Generators create individual barcode images on Windows systems, with command line options also available.