Home:  Products:  Fonts:  MaxiCode Font:  MaxiCode Font & Encoder Manual:
 

MaxiCode Font & Encoder User Manual

DEMO NOTICE:
The demo version of this product will intermittently encode and display a demo watermark. The purchased version does not include these limitations. [Order Now]

INDEX:  

Implementation Tutorials:

Specifications and Support:

If hardware is needed to read or verify barcodes, consider the 2D Barcode Scanners & Imagers IDAutomation offers.

* This is a website link; Internet access is required to view this item.

Implementation Options

In the event the font encoders and graphic encoders provided are not supported in the desired application, other implementation options are available:

  • MaxiCode 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 MaxiCode font.
  • The source code for any single encoder will be supplied with the purchase of the Unlimited Developer License and a signed source code license agreement.
  • IDAutomation Barcode Label Software Pro may be a good alternative. It is a stand-alone label design application with VB scripting support and database connectivity.
  • IDAutomation Image Generators create images one at a time on Windows systems. Command line options are also available.

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:

  1. MaxiCode Encoder for Windows - An application that provides an easy method for users to create MaxiCode barcodes and print or paste them into other applications.
  2. TrueType Font - The 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 - A graphic encoder for use in Access, Excel, Visual Basic and C++.
  5. Windows DLL - This component is installed in the Windows System32 folder and is used as the font encoder for Windows applications.
  6. Signed ActiveX CAB File - The CAB file may be used with Infopath, Internet Explorer and FrontPage.
  7. VBA Module - The module may be used in Visual Basic, Excel or Access.
  8. Visual Basic Source Code - the source code used to create the MaxiCode Encoder for Windows is also supplied. The source code for generating MaxiCode from any other single encoder may be provided with the purchase of the Unlimited Developer License and a signed source code agreement.
  9. Microsoft Office Examples are provided for Word mail-merge and Access. MaxiCode fonts cannot be used directly in Excel because the method Excel uses to display and print fonts is incompatible with stacked barcodes. To print barcodes from Excel, it is recommended to use the graphic encoder ActiveX Control or Word Mail-Merge. Additionally, IDAutomation offers Barcode Label Software that can easily print barcodes from data in Excel and other databases.

If it is necessary to verify MaxiCode barcodes, consider purchasing a MaxiCode Verifier or Imager.

Importing the VBA Module into Visual Basic, Excel or Access

The VBA module is required when using the font encoders in VB 6. The IDAutomation_Maxicode_Macro.bas module accesses the ActiveX DLL for the encoder function. Created in C++, the ActiveX DLL is fast. 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, choose Tools - Macro - Visual Basic Editor to open the VB editor.
  4. If the IDAutomation_Maxicode_Macro.bas module is to be imported, run the installation executable first. In the Visual Basic Editor, choose File - Import File, browse to the Program Files/IDAutomation.com MaxiCode Font and Encoder folder and select that .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.
     
    IDAutomation_Maxicode_Macro.bas
    EncMC(DataToEncode as String, Optional EncodingMode as Int)
    The default Encoding Mode is 2
    Example:
    =EncMC([Test Data.data])
    or
    =EncMC([Test Data.data],3)
Microsoft Access Implementation

There are two implementation options in Microsoft Access. When 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. Choose Insert - ActiveX control and choose the IDAutomation MaxiCode control.
  4. Move and size the control 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. Ensure the data is properly formatted.
  6. Additional implementation information is provided in the ActiveX 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 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 6 points.
  5. Right-click on the text field and enter the function call as a formula in the control source property. There are a number of ways to format the data being encoded. IDAutomation recommends 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" & [table1.zip] & "~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 in a Word mail-merge if Excel is used as the data source with the following procedure:

  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 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:
      =EncMC(A2&B2)
    • Ensure the data is properly formatted.
  7. Highlight the cell with the formula in it and choose 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 Windows 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.

Although not part of this package, when Crystal 11 or greater is used, barcode images may be streamed from a server and dynamically placed in the report with the Barcode Server for IIS. This graphic encoder implementation does not require any fonts or software to be installed or distributed when using IDAutomation's hosted Dynamic Barcode Generator Service.

How the Font and Encoder Works with Crystal Reports:

After installing the MaxiCode Font and Encoder for Windows, the encoder functions will be operative 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 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);
      );
      CompleteBarcodeString
  4. Change the DataToEncode = section of the formula so it encodes fields from a database. There are a number of ways to format the data being encoded. IDAutomation recommends 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" & {table1.zip} & "~029840~029002~029" & {table1.track_num}...";
  5. 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.
  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.

Refer to the Crystal Reports documentation for additional information about creating reports with formulas. If it is necessary to verify barcodes, consider purchasing a Barcode Verifier or Hand-Held Scanner.

ActiveX COM DLL Font Encoder

Install the Font and Encoder for Windows by running the EXE file provided in the package. Upon execution, this EXE 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 Control 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 Java. 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 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.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();
       System.out.println( mce.fontEncode(dataToEncode) );
    }
}

The data string returned by the fontEncode method will create a proper symbol when printed with the 2D font. To install the font on an operating system, consult the OS documentation or follow IDAutomation's font installation procedures.

When creating MaxiCode symbols, the output should be always be checked for encoded data verification, symbol quality and the bullseye size. When encoding MaxiCode for UPS, unique formatting is required.

The following methods are provided:

ProcessTilde:
boolean getProcessTilde()
void setProcessTilde(boolean pt)

Mode:
void setMode(int m)
int getMode()

Zip Code:
void setZipCode(String zp)
String getZipCode()

Service Class:
void setServiceClass(String s)
String getServiceClass()

Country:
void setCountry(String c)
String getCountry()

Data To Encode:
void setData(String d)
String getData()

Number of Codes:
setNumberOfCodes(int n)
getNumberOfCodes()

void fontEncode(String DataToEncode)
 

MaxiCode Barcode Support and FAQ

The following support issues are links to the appropriate section of the Data Matrix Encoder manual because the issue resolutions are the same:

 

 Product Quick Links: [Barcode Fonts | Font Tools | Components | Label Software | Scanners | Printers | RFID | Product Index]

© Copyright 2009 IDAutomation.com, Inc., All Rights Reserved. Legal Notices

Over 70% of Fortune 100 companies use IDAutomation's products to automate their businesses.