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. Many encoders in this package include support
for
MacroPDF, which allows thousands of characters to be encoded into multiple
barcode symbols.

Font and Graphic 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.

*not available in the demo, and are only included in the purchased
version of the Font and Encoder Suite.

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.

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 another programming language.

Source Code for any single encoder (available in Java,
C++, C# .NET or Visual Basic 6) may be provided by request after the purchase of an Unlimited Developer License of the
Font and Encoder Suite.

VBA Module for 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 Font and Encoder Suite.

Importing the VBA
Module

Extract the files provided with the product and run
the installation executable to install the required files
in the Application folder.

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 FileExcel
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

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.

If Excel or Access is being used, close the VB editor
by selecting File - Close, then choose File -
Save.

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.

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.

Open the report in design mode and select the
appropriate IDAutomation PDF417 font for the text field.

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:

Run the .exe file in the package and follow the steps to complete
installation.

Crystal Reports Integration

The
UFL
Font Formula accesses uses the Crystal UFL for the font encoder function. Created in C#,
it is much faster than the native formula. However, when distributing
the report, the Windows installation executable file must also
be installed to activate the UFL.

The
Native
Font Formula is
the complete font encoder function that may be embedded in a
report, but is slower than the Crystal UFL. When
distributing a report with this implementation, no other components are required
except
the 2D font. The slower speed of generation may not
be an issue when encoding less than 40 characters. The native formula
is only provided in the purchased version of the Font and Encoder Suite.

While not part of this package, IDAutomation provides two other Crystal
Reports implementations:

FileMaker Pro Plug-in

IDAutomation's 2D Barcode Font may be
easily integrated into
FileMaker using dynamic calculated fields without the use of scripts
with this FileMaker Plug-in. 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.

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 Font and Encoder Suite. Following are the steps for using the Native
JavaScript Font Encoder in HTML:

Open the HTML document or application where the barcode will
be integrated.

Add the following line at the top of the file just before the
</head> line to load the
appropriate JavaScript file:

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.

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

Obtain the string of data that when printed with IDAutomation's
PDF417 Font, will create a correct barcode:

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:

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

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:

Copy the DLL to the \System directory.

Register the DLL in the command prompt, change to the \system
directory, and type the command REGSVR32 "IDAutomationPDF417.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 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:

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)

PDF417 C++ .H Header File

The C++ header file for PDF417 may be provided with the purchase
of an Unlimited Developer License of the Font and Encoder Suite.
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.

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.

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

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.

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.

Popular Forum Post Resolutions:

Issues and Solutions

Common Problems 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.

Declare and initialize a variable with the desired X
position. Example:

my_x = printer.currentX

Replace the Printer.Print OutputString command
with something similar to the following:

The PDF417 fonts
listed below are available within the "Legacy Fonts" folder of the product
zip file in case they are needed.

IDAutomationPDF417n3

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

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

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

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.