Barcode Fonts, Components, ActiveX and .NET Windows Forms Controls, Java Servlets, 
DLLs and Barcode Scanners., Inc., Computers Hardware, Software & Services, Tampa, FL View your cart in the IDAutomation Store    

Home > Barcode Fonts > 2D Barcodes > QR-Code Font > QR-Code Font and Encoder User Manual

QR-Code Font and Encoder User Manual

Implementation Tutorials

Forum Support Download QR-Code Barcode Demo Now Download QR Code Generator Software Immediately After Purchase

QR-Code Implementation Options

Several graphic and font encoders are provided. The font encoders will generate a text string that will create a QR-Code symbol when combined with the Universal 2D Font. In the event the QR font and graphic encoders provided are not supported in the desired application, other implementation options are available:

Windows Installation Overview

Extract the files provided with the product and run the installation executable, which will install the following components:

  1. QR-Code Font Encoder Application - provides an easy method for users to create QR-Code barcodes and paste them into other applications.
  2. QR-Code Image Generator Application - an easy-to-use application that generates QR-Codes as a single windows metafile (WMF) image.
  3. Universal 2D fonts - used to create QR-Code symbols in addition to other 2D barcodes.
  4. Crystal Reports Formula - allows barcode generation in Crystal Reports versions 9 and above.
  5. Windows DLLs - are installed in the appropriate System folder and are registered by the installation program for COM Interop.
  6. Examples are installed for FileMaker Pro, Excel, Word mail-merge, Access, Crystal Reports and OpenOffice.

Microsoft Access

There are two implementation options for Microsoft Access, the ActiveX Control graphic encoder and the VBA Module font encoder. Both methods are implemented in the integration\Examples folder of the package.

Microsoft Excel

Microsoft Excel ExampleThere are multiple implementation options for Microsoft Excel. To display the ActiveX Control in Excel as a graphic object, refer to the ActiveX Tutorial. To use Excel as a data source for a Word Mail Merge, refer to the Word Mail Merge Tutorial.

QR-Codes may also be generated and displayed directly within Excel spreadsheets by implementing the VBA module with the 2D XLS Font. This is the most efficient method to use when multiple barcodes must be generated.

A working example is provided in the \Integration\Examples\Excel Example.xls file included with the install package. The data that is formatted for the font will not stack or look correct until the cells are formatted for multiple lines, as described in the 2D XLS font documentation.

The required VBA module is provided in the Integration\Excel & Access VBA folder of the product zip file.

Word Mail-Merge

QR-Code barcodes may be created in a Word mail-merge with the included ActiveX Control as a graphic object, or as a VBA font encoder with Excel as the data source. A working example is provided in the \Integration\Examples\Word Mail-Merge.doc file included with the install package.

OpenOffice for Windows

QR-Codes may be generated within OpenOffice applications that support VB scripting. A working Calc example is provided in the \Integration\Examples\Calc Example.ods file included with the install package. The required VB module is provided in the Integration\OpenOffice VB folder of the product zip file. Use the OpenOffice Font Encoder Tutorial with the VB module within the package.

FileMaker Plug-in

NOTE: The 2017 release of this product introduces a new FileMaker Font Encoder Object method that is cross platform compatible and easier to use than the Plugin. The provided Plugin does not support FileMaker 64 bit on the Mac and will not work with FileMaker Go in iOS. IDAutomation suggests using the font encoder object instead.

IDAutomation's QRCode Barcode may be integrated into FileMaker using dynamic calculated fields without the use of scripts with the FileMaker Plugin. The plugin is provided in the zip file of the purchased version only. View step-by-step instructions about installing, registering and using the plugin in FileMaker. A working meCard database example is provided in the \Integration\Examples\ folder within the install package.

QR-Code meCard Example

Microsoft .NET Integration

Implementation of QR-Code in .NET applications may be accomplished with graphic or font encoders. Integration into ASP.NET and other web applications is best implemented as a graphic encoder with the ASP.NET Server Control provided in the Font and Encoder Suite. Information about printing from the .NET Forms Control without using the font is provided in the .NET Forms Control Manual.

VB.NET Example:

  1. The following example uses the font encoder to create the text string that will generate an accurate QR Code barcode when printed with the Universal 2D barcode font:
  2. 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.QRCodeBarcode
  3. Acquire the special text string that will generate a readable QR Code when combined with the IDAutomation2D font:
    Dim NewBarcode As New QRCodeBarcode
    TextBox2.Text = NewBarcode.FontEncode(TextBox1.Text, True, QRCodeBarcode.EncodingModes.Byte, 
    QRCodeBarcode.Versions.AUTO, QRCodeBarcode.ErrorCorrectionLevels.M)

C# Example:

  1. 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.QRCodeBarcode;
  2. Obtain the string of data, that when printed with the IDAutomation2D Font, will create a correct symbol:
    QRCodeBarcode NewBarcode = new QRCodeBarcode();
    textBox1.Text = NewBarcode.FontEncode(textBox1.Text, false, EncodingModes.Alphanumeric, 
    Versions.AUTO, ErrorCorrectionLevels.H);

The Windows COM DLL Font Encoder

Install the Font and Encoder by running the .exe file provided in the package to install TrueType fonts, implementation examples and register the 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.

The FontEncode method is used to convert the data to encode into a string that will generate a QR barcode when combined with the 2D font. The Excel implementation provides a good example of using the COM DLL. VB and VBA scripting modules making use of the QR-Code COM object are provided in the \Integration\ folder of the product ZIP file.


Code Example:

'Initialize COM DLL
Dim QRFontEncoder As QRCodeFontEncoder
Set QRFontEncoder = New QRCodeFontEncoder
QRFontEncoder.FontEncode DataToEncode,ProcTilde,EncodingMode,Version,ErrorCorrectionLevel,
PrintableBarcodeString = Result

Generating QR Codes with Java Class Integration

The Java class file was compiled with the Sun JDK 1.4 and is compatible with Windows, Mac, Unix, Android, Linux and any other systems supporting Java. Copy the IDAutomation_JavaFontEncoder_QRCode.jar file from the "Java Class Encoder" folder to the system's classpath. Consult the Java documentation or the company that provides the Java virtual machine for assistance. In Windows, this may be accomplished by setting the CLASSPATH environment variable directly to the JAR file, for example: SET CLASSPATH  = C:\CLASSPATH\IDAutomation_JavaFontEncoder_QRCode.jar

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 com.idautomation.fontencoder.qrcode.*;
class QRCodeBarcodeExample {
   public static void main(String[] args) {
      QRCodeEncoder qre = new QRCodeEncoder();
      String DataToEncode = "";
      boolean ApplyTilde = false;
      String EncodingMode = "Byte";      // "Byte", "Alpha", "numeric"
      int Version = 0;                   // [-4 .. 40], -4 = M1, -3 = M2, -2 = M3, -1 = M4
      String ErrorCorrectionLevel = "M"; // "M", L", "Q", "H" 
      boolean BestMask = true;           // Best pattern mask 

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

Property Definitions: DataToEncode, ApplyTilde, EncodingMode, Version, ErrorCorrectionLevel, BestMask

JavaScript Font Encoder

QR Code JavaScript Font EncoderThe JavaScript Font Encoder is a complete font encoder in a single JavaScript file, meaning no other components need to be installed to create barcodes beyond the IDAutomation 2D Font. This product is only provided in the purchased version of the Font and Encoder Suite. The following describes how to use the Native JavaScript Font Encoder in HTML:

  1. Open the HTML document or application that the barcode is to be integrated with.
  2. Add the following line at the top of the file just before the </head> line to load the appropriate JavaScript file:
    <script language="JavaScript" src="IDAutomation_QRCode.js"></script>
    <script language="JavaScript" src="IDAutomation_GS1_HRI.js"></script>
  3. Add the barcode font as a class to be called in the document for the barcode to appear just before the </head> line:
    <style type="text/css">
    .barcodefont1 {
    font-family: "IDAutomation2D", "IDAutomation2D XLS";
    font-size: 100%; 
  4. Add a script where the barcode is to appear in the HTML document or text object, which is the file name without the ".js":
    <span class="barcodefont1">
    <script type="text/javascript">
    <script type="text/javascript">
  5. Modify "DataToEncode" with what is to be encoded in the barcode. This may be accomplished with a "variable" in JavaScript or a dynamically generated webpage.

JavaScript Font Encoder Parameters

function IDAutomation_QRCode(DataToEncode, ApplyTilde, EncMode, ErrLevel, Version, BestMask, QuietZone, HTML, IDElement)

/** Default values **/// change these lines to set new default value for parameters in the .js file

var IDAutomation_QRCode_default = {
'ApplyTilde': 1,   //Processes the tilde character for special functions
'EncodingMode': 0, //0=Binary | 1=C40 | 2=Only Numbers
'ErrorLevel': 0,   //0=15% "M" | 1=30% "H" | 2=7% "L" | 3=25% "Q"
'Version': 1,      //Set to -4 for MicroQR
'BestMask': 0,     //Set to 1 to process the mask (slower)
'QuietZone': 1,    //The white space around the symbol
'HTML': 1          //1=use <br> for carriage returns | 0=use CR LF for carriage returns

C++ .H Header File

The C++ header file is provided with the purchase of a Developer License or greater. The header file is unobfuscated C++ source code that makes use of character vectors. It was compiled and tested with Visual Studio and does not contain any OS-specific code. The QRCodeFontEncoder class may be used to return an encoded string that the IDAutomation 2D font can be applied to, in order to create QR-Code symbols. This class also contains several properties and enumerations that adjust the resulting symbol size and encoding method. Following is a C++ Implementation example:

#include <string>
#include <iostream>
#include <math.h>
#include <fstream>
#include "IDAutomationQRCode.h"
int main ()
     QRCodeFontEncoder QR;
     QR.ApplyTilde = true;
     QR.ErrorCorrectionLevel = QR.ECL_M;
     QR.EncodingMode = QR.Enc_Byte;
     QR.Version = QR.V_07;
     QR.DataToEncode = "";

XML/BI Publisher Integration

While IDAutomation does not support integration with BI Publisher, Oracle Developer Tim Dexter has written a blog about integrating IDAutomation QR-Code barcodes with XML Publisher.

Encoder Specifications

The IDAutomation2D Font is used in this package to create QR-Code symbols and is included in several formats including TrueType, PostScript, OpenType and PCL. To obtain all the fonts, download the latest IDAutomation2D Font package.


Documented Solutions:
Popular Forum Post Resolutions:

Back to Top

 ©Copyright 2019, All Rights Reserved. Legal Notices.

 Barcode Fonts | Components | Scanners | Support | Contact Us

Training Videos on YouTube  Join us on LinkedIn  Follow us on Twitter  Like us on Facebook
Over 70% of Fortune 100 companies use IDAutomation's products to automate their businesses.