IDAutomation.com, Inc., Computers Hardware, Software & Services, Tampa, FL Contact IDAutomationView your cart in the IDAutomation Store  
Loading
Home > Barcode Fonts > 2D Barcodes > PDF417 Fonts > PDF417 Barcode Font & Encoder User Manual

PDF417 Font & Encoder User Manual

Implementation Tutorials

Forum Support Download Demo of PDF417 Barcode Package Order PDF417 Barcode Package

Overview & Features

PDF417 has a high amount of barcode area efficiency and can encode approximately 850 characters of data. Because the PDF417 symbology uses Reed Solomon error correction, the symbol can withstand some damage without causing loss of data. This high degree of error correction results in decreased barcode read errors, and is far more advanced than linear barcodes that use check digits.

In addition to PDF417, these font and encoder packages include support for MacroPDF, which allows thousands of characters to be encoded into multiple barcode symbols. This advanced PDF417 font uses IDAutomation Vertical Interleaved Technology™, which allows increased throughput and printing at smaller X dimensions than competitors' products.

Font and Graphic PDF417 Encoders Provided

The font encoders provided in this package return a text string that, when combined with the appropriate font, will generate a readable PDF417 barcode. Using the encoders included with this package is needed due to the complexity of the symbology itself.

The graphic encoders provided are components that return a graphic image of the complete PDF417 barcode symbol, eliminating the need to combine encoded data with a font as with a font encoder. Please review the PDF417 Encoder for Windows Tutorial for a simple PDF417 encoder usage example.

PDF417 Font Encoders Windows Package Advantage Package
Windows COM DLL The Windows COM DLL is Included in the PDF417 Font and Encoder for Windows The Windows COM DLL Font Encoder is Included in the PDF417 Font and Encoder Advantage Package
Crystal Reports UFL The Crystal Reports UFL Font Encoder is Included in the PDF417 Font and Encoder for Windows The Crystal Reports UFL Font Encoder is Included in the PDF417 Font and Encoder Advantage Package
New: FileMaker Plugin The Filemaker Plugin Font Encoder is Included in the PDF417 Font and Encoder for Windows The Filemaker Plugin Font Encoder is Included in the PDF417 Font and Encoder Advantage Package
Native VB Module for Visual Basic, Excel & Access *   The Native VB Module for Visual Basic, Excel and Acccess Font Encoder is Included in the PDF417 Font and Encoder Advantage Package
Native Crystal Reports Formula *   The Native Crystal Reports Formula Font Encoder is Included in the PDF417 Font and Encoder Advantage Package
Native JavaScript Encoder * The Native JavaScript Font Encoder is Included in the PDF417 Font and Encoder Advantage Package Developer Version *
.NET DLL   The .NET DLL Font Encoder is Included in the PDF417 Font and Encoder Advantage Package Developer Version *
Java Class Library   The Java Class Library Font Encoder is Included in the PDF417 Font and Encoder Advantage Package Developer Version *
C++ Header .h File   The C++ Header .h File Font Encoder is Included in the PDF417 Font and Encoder Advantage Package Developer Version with a Signed Source Code Agreement **
PDF417 Graphic Encoders Windows Package Advantage Package
ActiveX Control The ActiveX Control Graphic Font Encoder is Included in the PDF417 Font and Encoder for Windows The ActiveX Control Graphic Encoder is Included in the PDF417 Font and Encoder Advantage Package
Signed ActiveX CAB File The Signed ActiveX CAB File Graphic Encoder is Included in the PDF417 Font and Encoder for Windows The Signed ActiveX CAB File Graphic Encoder is Included in the PDF417 Font and Encoder Advantage Package
.NET Forms Control   The .NET Forms Control Graphic Encoder is Included in the PDF417 Font and Encoder Advantage Package Developer Version *
ASP.NET Web Server Control   The ASP.NET Web Server Control Graphic Encoder is Included in the PDF417 Font and Encoder Advantage Package Developer Version *
Java Applet and Servlet   The Java Applet and Servlet Graphic Encoder is Included in the PDF417 Font and Encoder Advantage Package Developer Version *

*not available in the demo, and are only included in the purchased version.

Implementation Options

In the event that the included font and graphic encoders are not supported in the application being used, there are a few other implementation options available:

  • Font Encoders may be used within an application that is known to be compatible such as Microsoft Excel or Word to encode the data into a special text string, which can then be moved to an application that can combine the font with that text string to create a readable PDF417 barcode.
  • VB 6 Source Code is supplied with the purchase of any Developer License purchase and consists of about 1,200 lines of code using simple functions and arrays that may be easily converted to a programming language for another operating system.
  • Source Code for any single encoder (available in Java, C++, C# .NET or Visual Basic 6) will be supplied with the purchase of the Unlimited Developer License and a signed source code license agreement.
  • Barcode Label Software is a stand-alone application with VB scripting support and database connectivity.
  • Barcode Image Generators create individual images on Windows or Mac systems. Command line options are also available with this product.

Installation for Windows

Extract the files provided with the preferred PDF417 Font and Encoder package and run the installation executable, which will install the required files into the Application folder with the following components:

  1. PDF417 Encoder for Windows provides an easy method of generating PDF417 barcodes for printing, or pasting into other applications.
  2. TrueType Fonts are the most commonly used PDF417 fonts, and are installed for printing with different ratios from 1:3 to 1:5.
  3. Crystal Reports UFL is a plug-in for Crystal Reports versions 9 and above.
  4. ActiveX Control and Windows DLL may be used as a font encoder in Windows applications, and as a graphic encoder in Access, Excel, Visual Basic, Visual FoxPro and C++.
  5. Signed ActiveX CAB File may be used with InfoPath, Internet Explorer and FrontPage.
  6. VBA Module may be used in Visual Basic, Excel or Access.
  7. Implementation Examples are provided for Crystal Reports, VB, C++, Excel, Word and Access.
  8. Visual Basic source code is used to create the PDF417 encoder for Windows. The source code for generating PDF417 directly in Visual Basic, or the source to any encoder provided, is available with the purchase of the Unlimited Developer License and a signed source code license agreement.

VBA Module for Visual Basic, Excel and Access

The VBA module is required when using font encoder in VB 6, Excel or Access, and is available in 2 forms:

  • The IDAutomation_PDF417_Macro.bas module accesses the ActiveX DLL for its encoder function. Created in C++, the ActiveX DLL is faster than the native VBA code. However, when distributing an application, the ActiveX DLL must be installed and registered on each computer in order to operate properly.
  • The IDAutomation_Native_PDF417_Macro.bas module is the complete encoder function in VB form. It may be slower than accessing the ActiveX DLL, and the ApplyTilde feature is not available. However, when distributing an application, the ActiveX DLL does not need to be distributed. This module is only supplied in the purchased version of the Advantage Package.

Importing the VBA Module

  1. Extract the files provided with the product and run the installation executable to install the required files in the Application folder.
  2. Open the VB editor in Excel or Access:
    Access 2000-2003: select Tools - Macro - Visual Basic Editor.
    Access 2007-2010: select the Database Tools tab - Visual Basic.
    Excel 1997-2003: select Tools - Macro - Visual Basic Editor.
    Excel 2007: Add Developer tab, if not already there. Right click on the Office Button in upper left corner of Excel screen and choose "Customize Quick Access Toolbar". Click on "Popular" at the top of the list on the left and then Click "Show Developer Tab in the Ribbon" and save. Now go to Developer - Visual Basic - File - Import File
    Excel 2010-2013: Add Developer tab, if not already there. Go to File - Options - Customize Ribbon, Select "Developer" under Main Tabs on the right hand side and click ok. Now go to Developer - Visual Basic - File - Import File
  3. If importing the IDAutomation_PDF417_Macro.bas module, select Tools - References - IDAutomation PDF417 Barcode and then click ok.
  4. In the VB editor, select File - Import File and choose the module to import from the VBA folder. The native IDAutomation_Native_PDF417_Macro.bas module is only supplied in the purchased version of the product.
  5. If Excel or Access is being used, close the VB editor by selecting File - Close, then choose File - Save.
  6. After the file has been imported, the IDAutomation_PDF417 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. Parameters of the functions are defined in the API section of this manual.
     

    IDAutomation_Native_PDF417_Macro.bas

    IDAutomation_PDF417(DataToEncode As String, Optional EccLevel As Integer, Optional ColumnSpecify As Integer, Optional RowSpecify As Integer, Optional Truncate As Integer, Optional ForceBinary As Integer) As String Access Example

    =IDAutomation_PDF417([Test Data.data])

    or

    =IDAutomation_PDF417([Test Data.data],2,4,0,0,1)

    IDAutomation_PDF417_Macro.bas

    IDAutomation_PDF417(DataToEncode As String, Optional EcLevel As Integer, Optional TotalColumns As Integer, Optional TotalRows As Integer, Optional Truncated As Integer, Optional PDFMode As Integer, Optional ApplyTilde As Integer) As String Example

    =IDAutomation_PDF417([Test Data.data],2,4,0,0,0,0)

Microsoft Access Implementation

There are 3 implementation options for Microsoft Access, 2 of which are supported in the PDF417 Font and Encoder packages. When used in reports and forms, a graphic encoder may be the best option.

Using Graphic Encoders in Access

  1. Run the .exe file in the package and follow the steps to install the product.
  2. Open an Access report in design mode.
  3. Select Insert - ActiveX Control and choose the IDAutomation PDF417 control.
  4. Adjust 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 select 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 display after the report is saved and executed.

    Please review the ActiveX Barcode Control User Manual for more about ActiveX barcode generation in Access.

Using Font Encoders in Access

  1. Run the .exe file in the package and follow the steps to install the product.
  2. Import the VBA module into the Access database.
  3. Open an Access report in design mode.
  4. Add a text field to the report where the barcode will be positioned. Size the field appropriately so that it is large enough to display the barcode. Change the field's font point size to 8.
  5. Right-click the text field and enter the function call as a formula in the control source property. For example:
    =IDAutomation_PDF417([Test Data.data])
    The following formula combines 2 fields into a single symbol and inserts a tab function between them:
    =IDAutomation_PDF417([Test Data.TextData] & Chr(9) & [Test Data.NumberData])
  6. Save the report and run it. A special data string should appear in the text field, and this is the data that will create a correct barcode when combined with the PDF417 Font.
  7. Open the report in design mode and select the appropriate IDAutomation PDF417 font for the text field.
  8. Save the report and run it; a correct PDF417 barcode symbol should display in the text field.

How to Embed a Graphic PDF417 Encoder

  • The Native Linear + 2D Barcode Generator for Access is an object that lives in the Access report itself, thus eliminating the need to install fonts or components such as ActiveX Controls or plug-ins. This product is not available as part of the PDF417 font and encoder packages, and must be purchased separately.

Microsoft Word Mail-Merge Implementation

PDF417 barcodes may be created in a Word mail-merge if Excel is used as the data source on Windows with the following procedure:

  1. Run the .exe file in the package and follow the steps to complete installation.
  2. Import the VBA module into the Excel spreadsheet that will be used as the data source.
  3. 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.
  4. Select a blank column on Row 1, to the right of the last populated column in the spreadsheet, and title it Barcode.
  5. 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:
    =IDAutomation_PDF417(A2&B2)
    The following formula adds only column A to the barcode, with some optional parameters:
    =IDAutomation_PDF417(A2,3,2,0,0,0)
    The following formula adds columns A, B and C to the barcode and separates them with a comma delimiter:
    =IDAutomation_PDF417(A2&","&B2&","&C2)
  6. Highlight the cell with the formula in it and choose Edit - Copy.
  7. Select the entire range of cells to paste this formula into the Barcode column and choose Edit - Paste.
  8. Follow the procedures in MS Word to add this spreadsheet as the data source for the mail merge.
  9. Add the mail merge field of Barcode to place the barcode in the document.
  10. Highlight the Ā«BarcodeĀ» merge field and select the IDAutomationPDF417 font.
  11. After the mail-merge is performed, the barcodes should appear in the merged documents.
  12. A working example is provided in the Word Mail-Merge.doc file included in the Windows install package.

Crystal Reports PDF417 Barcode Integration

In this font and encoder package, IDAutomation provides two font encoders for use in Crystal Reports:

  • The UFL Formula accesses the ActiveX DLL and Crystal UFL for the font encoder function. Created in C++, the ActiveX DLL is faster than the native formula. However, when distributing an application, the ActiveX DLL and Crystal UFL must also be installed and registered for proper operation.
  • The Native Formula is the complete font encoder function as a Crystal formula. It is slightly slower than accessing the ActiveX DLL, the ApplyTilde feature is not available and it only supports binary compaction mode, so the symbol generated may be slightly larger. However, when distributing a report, no other components are required except the PDF417 font. This formula is only supplied in the purchased version of the Advantage Package.

The ASP.NET Barcode Web Component allows dynamic barcode streaming from the server to a report, and is compatible with Crystal XI or greater. This graphic encoder product does not require any fonts or software to be installed or distributed with an active subscription to the Hosted Dynamic Barcode Generator Service.

Crystal Reports Limitations Prior to Version 9

The Crystal Reports UFL is designed to work with Crystal Reports 6.0 and above. However, because of a Crystal Reports limitation prior to Version 9, only limited information (up to about 40 ASCII characters or 30 binary characters, which allows up to 254 characters in a string) may be encoded with the ECC level set to 1 and the number of columns set to 10. Approximately 50 ASCII characters may be encoded if the truncate option is selected, as shown in this example formula:

IDAutomationPDF417EncoderPDFSet({Table.Field}, 1, 10, 0, 1, 1, 0 )

If the PDF417 symbol exceeds 10 columns or 3 rows, the barcode will be damaged because of the formula truncation. To overcome this limitation, version 9 or greater is required.

Crystal Reports versions 9 and later resolve the 254-character limitation by using a formula that retrieves the data encoded in 254-byte chunks. A simple example of creating a PDF417 barcode in Crystal is included in the Font and Encoder package.

Using the Crystal Reports UFL Formula

  1. After installing the PDF417 Font and Encoder for Windows, the IDAutomationPDF417Encoder functions will be available in Crystal Reports.
  2. The IDAutomationPDF417EncoderPDFSet 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.
  3. The IDAutomationPDF417EncoderPDFGet function returns a string for the designated data segment. A correct barcode string is achieved when all data segments are combined.
  4. When the barcode string is combined with the appropriate font, it will create a PDF417 barcode.

How to Create a PDF417 Barcode within Crystal Reports

  1. Select View - Field Explorer, then Formula Fields. Right-click and select New. Enter a name to identify the formula created and choose OK.
  2. The Formula Editor should now appear.
     
    • If utilizing the Native Formula, change the Formula Syntax to Basic Syntax. Copy and paste the text from the Native Formula for IDAutomation PDF417 Fonts.txt file into the Formula Editor dialog box. The Native Crystal Report Example.rpt file is provided in this package as an example, and may be referred to for troubleshooting purposes.
       
    • If using the UFL Formula, 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 CompleteBarcodeString:="";
      stringVar DataToEncode:= {Table.Field};
      numberVar i:=0;
      numberVar Segments:= IDAutomationPDF417EncoderPDFSet(DataToEncode,0 ,0 ,0 ,0 ,0 ,0 );
      For i:=0 to Segments Do
      	(
      	CompleteBarcodeString := CompleteBarcodeString + 
      	IDAutomationPDF417EncoderPDFGet(i);
      	);
      	CompleteBarcodeString
      
    Change the DataToEncode = section of the formula so it encodes fields from a database. Save the formula.
  3. The field where the PDF417 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.
  4. Choose File - Print Preview or the Preview tab. A series of many numbers will be visible in the text field; this is normal.
  5. After the font of the field is changed to one of the PDF417 fonts (such as IDAutomationPDF417n3) a correct barcode will be created.

Crystal Reports PDF417 UFL Set Function

(Enter zeros for defaults in all integer fields.)
Int DataSegments=IDAutomationFontEncoderPDF417Set(DataToEncode As String, EcLevel As Integer, TotalColumns As Integer, TotalRows As Integer, Truncated As Integer, PDFMode As Integer, ApplyTilde As Integer)

There are a number of ways the data-to-encode property can be formatted. It is also possible to combine multiple fields and place functions in a single barcode. Here are some examples:

  • The following formula combines two fields in a single barcode and places a tab function between them:
    stringVar DataToEncode:= {Table1.DataField1} & CHR(9) & {Table1.DataField2};
    Use CHR(9) for tab.
  • The following formula places a tab function and a return function after the barcode:
    stringVar DataToEncode:= {Table1.DataField1} & CHR(9) & CHR(13);
    Use CHR(9) for tab and CHR(13) for a return.
  • The formula below combines two fields with the date function:
    stringVar DataToEncode:= {Table1.DataField1} & CHR(9) & {Table1.DataField2} & CHR(13) & CurrentDate;
    Use CHR(9) for tab and CHR(13) for a return.

FileMaker Pro Plug-in

IDAutomation's PDF417 Barcode Font may be easily integrated into FileMaker using dynamic calculated fields without the use of scripts with this FileMaker Plugin. Encode up to 800 characters into a barcode, which is ideal for creating barcodes on badges, especially when concatenating multiple fields into a single barcode.

PDF417 Badge Example

View step-by-step instructions on installing, registering and using the plugin in FileMaker.

There are several parameters that can be set to alter the barcode, where each parameter is separated by the pipe symbol "|". For example:

IDPD_PDF417(First Name & " " & Last Name & " " & Employee Number & "|1|8|0|1|0|0")

Parameters in the order they are to be entered:

  • Data to encode - Enter the field name or hard data in quotes.
  • EcLevel As Integer - This is the Error Correction Level and acceptable values are 1-8.
  • TotalColumns As Integer - This sets the number of Columns.
  • TotalRows As Integer - This sets the number of Rows.
  • Truncated As Integer - Set to 1 for truncated and 0 for non-truncated.
  • PDFMode As Integer - Default of 0 is binary mode; 1 is text mode which only encodes ASCII 9, 10, 13 and 32 - 127
  • ApplyTilde As Integer - Set to 1 for enable the Apply Tilde and 0 to disable.

Native JavaScript Font Encoder

The Native JavaScript Font Encoder is a complete font encoder in a single JavaScript file; no other components need to be installed to create barcodes. This product is only provided in the purchased version of the Advantage Package. Following are the steps for using the Native JavaScript Font Encoder in HTML:

  1. Open the HTML document or application where the barcode will be integrated.
  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_PDF417_Font_Encoder.js">
    </script>
  3. Add a script where the barcode is to appear in the HTML document or text object, which is the file name without the ".js":
    <font face="IDAutomationPDF417n3" size="2">
    <script type="text/javascript">
        document.write(IDAutomation_PDF417_Font_Encoder("Created with the IDAutomation.com Native JavaScript Font Encoder"));
    </script></font>
  4. 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

Result = (DataToEncode As String, Optional ApplyTilde, Optional EccLevel, Optional ColumnSpecify, Optional RowSpecify, Optional Truncate, Optional ForceBinary, Optional HTML)
Example
IDAutomation_PDF417_Font_Encoder("ECC200_123456789012",false,0,10,0));

The HTML property sets the value for the carriage return that draws the barcode. If HTML is true (the default setting), the carriage return is <br> for use in HTML only. If it is false, the carriage return is an ASCII 13 + ASCII 10, which is a return and line feed.

Using the .NET DLL in .NET Applications

Implementing PDF417 barcodes in .NET applications may be accomplished with the .NET DLL font encoder or the .NET Forms Control graphic encoders. Information about printing from the .NET Forms Control without using the font is provided in the .NET Forms Control User Manual.

.NET PDF417 Font Encoder Example

The following is an example using the font encoder to obtain the data that when printed with IDAutomation's PDF417 Font, will create an accurate barcode. The source code for this font encoder example is provided in the package for testing and reference.

  1. In a .NET project, add a reference to the DLL and place the import statement in the declarations section of the project. For example:
    Imports IDAutomation.Windows.Forms.PDF417Barcode
  2. Obtain the string of data that when printed with IDAutomation's PDF417 Font, will create a correct barcode:
    Dim NewBarcode As PDF417Barcode = New PDF417Barcode() 
    TextBox2.Text = NewBarcode.FontEncoder(TextBox1.Text, 0, 0, 0, False, PDF417Barcode.PDF417Modes.Text,True)

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.PDF417Barcode;
  2. Obtain the string of data, that when printed with IDAutomation's PDF417 Font, will create a correct symbol:
    PDF417Barcode NewBarcode = new PDF417Barcode();
    textBox2.Text = NewBarcode.FontEncoder(textbox1.Text, 0, 0, 0, false, PDF417Barcode.PDF417Modes.Text, true)
    

Using the Java Class PDF417 Font Encoder

This section describes using the font encoder process to generate PDF417 barcodes using Java. Implementation of PDF417 in Java as a graphic encoder is described in the Java User Manual.

Installing the Java Encoder Class Library

Copy the PDF417Encoder.class file from the Java Class Encoder folder of the package to the root directory of the computer's classpath. If assistance is needed with the classpath, consult the Java documentation or the company from where the Java virtual machine was acquired.

Integrate the Java Font Encoder Method

After the Encoder Class Library is installed, it may be called from an application as in this example:

import java.io.*;
import IDautomationPDFE.*;

class PDFTest {
    public static void main(String[] args) {
        String dataToEncode = "This is a test of the IDAutomation.com PDF417 Java 
Encoder.";
        PDF417Encoder pdfe = new PDF417Encoder();
        System.out.println(pdfe.fontEncode(dataToEncode));
    }
}

The data string returned by the FontEncode method will create a proper PDF417 symbol when displayed or printed with the PDF417 font. To install the font on an operating system, consult the operating system's documentation.

Configuration parameters and methods of the PDF417 for Java font encoder class:

  • fontEncode() - the main method that formats and returns a string of data formatted to the PDF417 Font.
  • PDFColumns - number of columns for PDF417 (the default is 5).
  • PDFECLevel - error correction level for PDF417 (the default is 2).
  • PDFMode - the PDF417 mode can be NUMERIC, TEXT or BINARY (the default is BINARY).
  • truncated - if set to "true", truncated symbols will be created according to the ISO specification.

Using the COM DLL PDF417 Font Encoder

Install the product by running the .exe file provided in the package. Upon execution, it installs TrueType fonts, implementation examples and registers the ActiveX DLL. To register the DLL manually, perform the following:

  1. Copy the DLL to the \System directory.
  2. Register the DLL in the command prompt, change to the \system directory, and type the command REGSVR32 "IDAutomationPDF417.dll".
  3. 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 steps 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 PDF417 font, will create a correct barcode. The following is Visual Basic 6 code that places the converted data in the Output string:

Dim Output as String
Dim PDF417FontEncoder As PDF417Lib.PDF
Set PDF417FontEncoder = New PDF
PDF417FontEncoder.FontEncode DataToEncode, 0, 0, 0, 0, 0, 0, Output

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

COM and .NET DLL Methods and Properties

There are a variety of methods and properties available in the COM and .NET DLL PDF417 encoder components.

  • TotalColumns: The number of data columns in the PDF417 barcode will control the width of the barcode. The maximum number allowed is 30, but leave at 0 for the default.
  • EcLevel: The level of Reed Solomon error correction in the symbol. More error correction creates a larger symbol that can withstand more damage. Leave at 0 for the default.
  • PDFMode: Binary mode encodes bytes of data; text mode encodes all characters on the US keyboard plus returns and tabs. The default of 0 is binary mode; 1 is text mode which only encodes ASCII 9, 10, 13 and 32 - 127 but takes up less space.
  • TotalRows: The minimum number of total rows can be set by this. Leaving this setting at the default of 0 is suggested.
  • Truncated: A truncated PDF417 symbol is more area-efficient than standard PDF417. By selecting this option, the right hand side of the PDF417 is removed or truncated. This option should only be used in clean environments because it is more susceptible to damage than standard PDF417 barcodes.
  • ApplyTilde: If set to True" use the format ~ddd to specify the ASCII code of the character to be encoded. It is off by default. For example, if the text ~029AB is entered in the data field, it will actually be encoding GSAB where GS is a delimiter ASCII 29 character. This can be used in a single string to encode GS and RS characters (GS = ASCII 29 and RS = ASCII 30). Other commonly used ASCII codes are ~009 for a tab and ~013 which is a return function. These are useful when encoding multiple fields in a single symbol.

COM DLL FontEncode Method

FontEncode (DataToEncode As String, EcLevel As Integer, TotalColumns As Integer, TotalRows As Integer, Truncated As Integer, PDFMode As Integer, ApplyTilde As Integer, Output as String)

Example: PDF417(InputString,"0","0","0","0","0","0",OutputString)    (Enter zeros for defaults in all integer fields)

.NET DLL FontEncoder Method

FontEncoder (DataToEncode As String, EcLevel As Integer, TotalColumns As Integer, TotalRows As Integer, Truncated As Boolean, PDFMode, ApplyTilde As Boolean)

Example: TextBox2.Text = NewBarcode.FontEncoder(DataToEncode, 0, 0, 0, False, PDF417Barcode.PDF417Modes.Text, True)

View the ASCII chart for additional details.

PDF417 C++ .H Header File

The C++ header file for PDF417 may be provided with the purchase of an Unlimited Developer License and a signed Source Code Agreement. The header file is unobfuscated C++ source code that makes use of character vectors. It was compiled and tested with Visual Studio 2005 and 2008, and does not contain any OS specific code. The PDF417FontEncoder class may be used to return an encoded string that the PDF417 font can be applied to, in order to create PDF417 barcodes. This class also contains several properties and enumerations that adjust the resulting symbol size and encoding method.

C++ Implementation example

#include <string>
#include <iostream>
#include "PDF417FontEncoder.h"

int main ()
{
     PDF417FontEncoder PDF;
     long ECL = 3;
     PDF.setApplyTilde(true);
     PDF.setErrorCorrectionLevel(ECL);
     PDF.PDF417Mode = PDF417FontEncoder::PDF417Modes::Binary;
     PDF.setDataToEncode("IDAutomation.com");
     printf(PDF.FontEncode().c_str());
}

MacroPDF417 Methods and Properties

Many of the encoders in this package support MacroPDF, which allows additional data to be encoded by dividing the data into multiple barcode symbols.

Java and .NET fontEncodeMacroPDF Method

String fontEncodeMacroPDF(String DataToEncode, int inEccLevel, int inColumnSpecify, int inRowSpecify, boolean inTruncate, int inMode, int inMacroSegIndex, int inMacroFileId, boolean inMacroLastIndex)

COM DLL and ActiveX Control FontEncodeMacroPDF Method

FontEncodeMacroPDF(BSTR DataToEncode, int inEccLevel, int inColumnSpecify, int inRowSpecify, int inTruncate, int inMode, int inTilde, int inMacroSegIndex, int inMacroFileId, int MacroLastIndex, BSTR *ReturnVal);

Distributing Files Within an Application

After purchasing a Developer License for a PDF417 Font and Encoder package, the font files and applicable components may be integrated and distributed with an application. If an Unlimited Developer License is purchased with a signed source code agreement, the source code for any single encoder may be integrated directly into the application, thus eliminating the need to distribute DLLs. The source code is available in VB, C++ and Java. Remember to have the application register the DLLs after they are copied to the system folder.

NOTE: Native font encoders only require the font to be redistributed. Redistribution of IDAutomation fonts and components requires the purchase of a Developer License.

Windows Encoder COM Files*
Purpose of File File to Distribute Notes
Font File IDAutomationPDF417n3.ttf The PDF417 TrueType font. May also distribute any other font files in the package as necessary.
Encoder DLL IDAutomationPDF417.dll This is the encoder DLL that formats the PDF-417 font. It can be found in the system directory after installation. Because it was created with C++ ATL, it is small and has no dependencies.
Windows Encoder .NET Files*
Purpose of File File to Distribute Notes
Font File IDAutomationPDF417n3.ttf The PDF417 TrueType font. May also distribute any other font files in the package as necessary.
Encoder DLL idautomation.pdf417.dll This is the encoder DLL and forms control. It requires the .NET Framework 1.0 or greater.
Java Encoder Files for Macintosh, Linux, Unix and Other Systems.
Purpose of File Files to Distribute Notes
PDF417 Java Class Library PDF417Encoder.class These files must exist in the IDautomationPDFE directory from the class path because IDautomationPDFE is the package name.
Font File <depends on OS> IDAutomation's PCL and PostScript fonts are commonly used on UNIX systems.
Crystal Reports UFL Encoder Files*
Purpose of File File to Distribute Notes
Font File IDAutomationPDF417n3.ttf The PDF417 TrueType font. May also distribute any other font files in the package as necessary.
Encoder DLL IDAutomationPDF417.dll This is the encoder DLL that formats the PDF-417 font. It can be found in the system directory after installation. Because it was created with C++ ATL, it is small and has no dependencies.
VB Runtime DLL msvbvm60.dll This runtime file already exists on most PCs and it is required for the Crystal UFL. It can be found in the system directory after installation.
Crystal Runtime U2lcom.dll This is a crystal runtime file that is required to work with UFLs.
Crystal UFL CRUFLidautomationPDF.dll The IDAutomation Crystal UFL. It can be found in the system directory after installation.

*If distributing files for Windows, consider using an advanced installation application.

PDF417 Fonts Frequently Asked Questions

Can the font just be applied to the data to create a PDF417 symbol?

Implementing the PDF417 font requires use of both the fonts and the encoders. To generate an accurate PDF417 barcode from a font, the data you wish to turn into a barcode must first be encoded into a text string that will create a readable PDF417 barcode once the appropriate font is applied to it. The purpose of the encoder is to convert the data to be encoded into proper bar and space patterns formatted to the PDF417 barcode font.

Using an encoder is necessary due to the complexity of the symbology and the required Reed Solomon error correction. Attempts to manually encode this data would be extremely complicated, and the font encoders are available to make this procedure much faster, easier and error-free.

What are the benefits of printing PDF417 as a font?

PDF417 fonts are more flexible than other components such as an ActiveX control or .NET Forms Control because the fonts can be combined with these ActiveX, .NET, Java and other encoders depending on which will work best in a given environment.

Can extended characters such as © ® ë ö be encoded and scanned?

Yes, it is possible to scan and encode extended characters in a PDF417 barcode, provided the following steps are taken:

  1. Encode the data using BASE256. This option encodes ASCII 1 to 255 of the ASCII character set. When encoding over 1024 characters of data, ASCII 127-160 must also be encoded in the format ~ddd, with ApplyTilde set to true.
  2. Scan the PDF417 barcode via the serial interface option (data bits have to be 8N) on the scanner. Normally, keyboard wedge and USB scanners do not support extended characters above ASCII 128, and can only scan characters that are on the keyboard. Contact the scanner vendor for more information on how to enable extended character recognition, as some of the scanner's internal settings might need to be modified.

PDF417 fonts are also highly scalable with operating system, application and printer independence as indicated in this PDF417 font quality statement.

Answers to other questions may be provided in the PDF417 FAQ and Tutorial

PDF417 Font Issues and Solutions

Line Spacing Issues: Too Much Space Between Lines

Some implementations of PostScript fonts can cause a small space to appear between rows in the PDF417 symbol. The only way to resolve this issue is to confirm that the print application is not adding additional line feeds. Or, in the case of PCL fonts, change the vertical motion index as indicated below. This space will not cause problems with scanners and the barcode will still be readable.

When using 12 or 14 point PCL fonts, an adjustment to the vertical motion index is not usually necessary. However, if other sizes are used, an adjustment may be needed to close the gap between rows. To set the vertical motion index, issue the command before printing with the PDF417 font. The code for the Vertical Motion Index Command is escape "<Ec>" + "&" + lowercase L "l" + Number Index + Capital "C". Use the chart below to find the command for the specific font point size. The number may be adjusted as necessary for the printer.

PCL Font Point Sizes Vertical Motion Index Commands
10 <Ec> &l6.5C
8 <Ec> &l5.2C
6 <Ec> &l3.9C

In the example above, the <Ec> represents the escape character for the software. In DOS Edit, Ec is represented by holding down the CTRL key and pressing the letter P, releasing both keys and then press the ESC key.

X Axis Issues or Left Margin Alignment Issues

This issue may exist if there is an attempt to move the barcode to the right on the X axis using a programming language, such as Visual Basic. When using the printer.currentX specification to set the X axis, only the first line of the barcode would print in the new position and the remaining lines would print at zero, all the way to the left. This is because the printer.currentX specification is reset every time a return is performed. A return must be performed to print the font on the new line.

The best solution to this problem would be to find a command that could move the left margin so that returns will move the insertion point to the correct position. Since Visual Basic does not have a command such as this, a small piece of code must be written to set the currentX for each line.

  1. Declare and initialize a variable with the desired X position. Example:
    my_x = printer.currentX
  2. Replace the Printer.Print OutputString command with something similar to the following:
For i = 1 To Len(Output)
	out1 = out1 & Mid(Output, i, 1)
	If Mid(Output, i, 1) = Chr(10) Then
		out1 = Replace(out1, Chr(10), "")
		out1 = Replace(out1, Chr(13), "")
		Printer.CurrentX = my_x
		Printer.Print out1
		out1 = ""
	End If
	Next i

PDF417 Font and Encoder Specifications

Character Sets GLI0 encodes ASCII 0 to 255 of the ASCII character set.
Data Compaction Modes Text Compaction with all four sub modes supports text and numbers.
Byte Compaction mode supports numbers, text and binary data.
Error Correction Levels Selectable from 1 to 8
Font Point Size: Approximate IDAutomationPDF417n3 X Dimensions
12 .048 cm .018"
10 .038 cm .015"
8 .032 cm .012"
6 .024 cm .009"
4 .016 cm .006"

Font Name Font Description
IDAutomationPDF417n3 X to Y ratio =3
The standard PDF417 font with an X to Y ratio of 1:3 which is recommended by national and international standards. Y dimension = 3X
IDAutomationPDF417n4 X to Y ratio =4
A taller, thinner PDF417 font for use with lower-quality readers and special applications. It has an X dimension of .75 times the X dimension of PDF417n3. It has an X to Y ratio of 1:4. This version may also work better with laser barcode scanners that read PDF417. It may be necessary to increase the font size after switching to this ratio.
IDAutomationPDF417n5 X to Y ratio =5
A taller, thinner PDF417 font designed to be used for FEDEX label specifications and other applications that require an X to Y ratio of 5. The X dimension of this font is .010" or 10 MILS when printed at 11 points.
IDAutomationPDF417n2 X to Y ratio =2
A shorter version of the PDF417 font for high-quality imagers and scanners. It has an X dimension of 1.5 times the X dimension of PDF417n3 and an X to Y ratio of 1:2. This font may be used to reduce the symbol height if a high-quality scanner is being used in a clean environment. It may be necessary to decrease the font size after switching to this ratio.

Note: Most scanners cannot dependably read this font.

Font Names Prior to 7-2003 Current Font Name
PDF417c2 IDAutomationPDF417n2
PDF417c IDAutomationPDF417n3
PDF417c4 IDAutomationPDF417n4
PDF417c5 IDAutomationPDF417n5

In addition to the PDF417 font included in this package, IDAutomation also offers the Universal 2D Font, which is compatible with all encoders of this product. The Universal 2D Font enables PDF417 and matrix barcode types such as Aztec, DataMatrix and QR Code to be created from the same font.

Related PDF417 Barcode Font Information

Back to Top

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

 Barcode Fonts | Components | Scanners | Support | Contact Us
Training Videos on YouTube Join us on Google Plus 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.