dLSoft

Quick_links...

Search site
Trial products
Online tutorials

Products

Barcodes for Office
Barcode creators
Barcode fonts
Developer tools
Label printing
Labelling tools
Point Of Sale

Resources

New to barcodes?
How To ...
Support centre
Tutorial centre
Which product

For users

Common problems
What's New?
Newsletter
Online registration
Contact us

GS1

Award 2009

Award 2008

 

PDF417 Font Kit

The PDF417 font kit includes the fonts and both 32 and 64 bit ANSI and Unicode DLLs and 32 and 64 bit Active-X components, a fully-managed-code .NET component, and a Java class, allowing calls from most programming languages to convert a character string into a PDF417 or MicroPDF barcode, plus a 32 bit UFL for use within Crystal Reports*.

Fonts are provided in TrueType, OpenType, and Postcript formats, at several weights and with height/width ratios of 2, 3, 4, and 5 to 1.

The DLL is suitable for calling from Visual Basic 6, VB.NET, C#, Visual C++, Microsoft Office, Delphi, C++ Builder and many other development systems. The DLL/OCX provides control over the Security level, the number of codeword columns and the encoding Mode.

The OCX may be used through its properties, and the Caption property may be bound to a database field.

The kit includes examples (with source code) for C/C++, MS Access, Crystal Reports*, Delphi, Java, VB6, VB.NET and Visual FoxPro. Also included are mailmerge samples for Access and Excel data sources.

Push button    to Download or buy

[PDF417 is also supported by the Universal 2D Barcode font kit]


PDF417 (Portable Data File 417) is a stacked barcode symbology capable of encoding over a kilobyte of data in a symbol. PDF417 may include extensive error-correction enabling data to be recovered from a symbol which has been damaged or corrupted.

PDF417 barcode    PDF417 barcodes

The components in the PDF417 font kit convert the barcode data into a string of ASCII characters which, when displayed/printed in one of the fonts provided, appears as a collection of rectangles that form the PDF417 barcode symbol.

There are 900 different patterns of rectangles (codewords) that may be incorporated into a PDF417 barcode symbol, and several modes available for encoding.

Encoding Modes

EXC (Extended Alphanumeric Compaction mode) - allows encoding of all printable ASCII characters into about 2 characters per codeword. Within the EXC mode there are several submodes:

EXC Alpha - starts in upper case
EXC Lower - starts in lower case
EXC Mixed - numeric and other punctuation
EXC Punctuation - punctuation & bracket characters.

Binary/ASCII Plus mode - allows encoding of 256 international characters including the full ASCII set plus any 8-bit value in the range 0 - 255. This mode allows encoding approximately 1.2 bytes per codeword and so is considerable less efficient than EXC mode.

Numeric mode - allows encoding of a string of digits with a density of approximately 2.95 digits per codeword. Recommended where more than 13 digits are to be encoded. Numeric mode symbols may not contain non-numeric characters.

The maximum capacity of PDF417 symbols is approximately as follows:

Numeric mode – maximum capacity 2700 digits*
Alphanumeric text – maximum capacity 1800 characters*
Byte values – maximum capacity 1100 bytes

*Note that capital letters, punctuation, mode shifts and new lines/paragraphs reduce these value.

Security level

One of the most valuable features of the PDF417 barcode is its ability to allow correction of errors. This ability is provided by the inclusion of additional codewords within the symbol, so that the data codewords may be reconstructed even if some are defaced or misread.

The number of damaged codewords (Nmax) which may be recovered depends on the security level (which in turn determines the number of additional characters included in the symbol)

 

Security level

Nmax

0

0

1

2

2

6

3

14

4

30

5

62

6

126

7

154

8

510

Columns

PDF417 barcode symbols may be reproduced with different number of codewords per row, and therefore in several widths.

The user may specify the number of codewords per row in all dLSoft products support PDF417, subject to the limitation that all PDF417 must contain at least 3 rows. In general tall, thin barcodes read more reliably than short, wide symbols, although there may be restrictions applied by the type of barcode scanner employed.

Micro PDF417

Micro PDF417 is a multi-row symbology based on PDF417 and designed for applications requiring a greater area efficiency but lower data capacity than PDF417. A specific and limited set of symbol sizes is available, each size including a fixed level of error correction.

Micro PDF417 barcode  Micro PDF 417 barcode

MicroPDF417 provides for three encoding modes: Text, Byte and Numeric compaction. Text is for general text, Numeric for encoding data consisting only of digits, and Byte to allow for the first 127 ASCII characters but with a reduced level of efficiency. Four symbol widths are permitted, each specifying the number of data columns (1 – 4). Within each symbol width a variable number of rows provide for a maximum data capacity of:

  • Text compaction mode 0: 250 characters (2 data characters per codeword)
  • Byte compaction mode 1: 150 characters (1.2 data characters per codeword)
  • Numeric compaction mode 2: 366 characters (2.93 data characters per codeword)

Appended symbols are not supported at this time.

Truncated PDF417

PDF417 symbols that are missing one data codeword and the stop bars from each row are known as Truncated PDF417 symbols. Most scanners will read such symbols, but some will not!

Truncated PDF417 barcode   Truncated PDF417 barcode

Truncated PDF417 symbols have the advantage of being smaller than full PDF417, but the disadvantage of being less able to tolerate damage without becoming unreadable.


Sample code in C/C++

A typical C/C++ call to the DLL to convert and output a text string is:

iCodetype=0;             // 0 for PDF417, 1 for Micro PDF417, 2 for Truncated PDF417
iColumns=4;               // 0 for default
iLevel=0;                     // 0 for default
iMode=0;                    // 0 for Auto (modes are EXC, Binary/ASCII Plus)
iFlags=0;                    //
strcpy(szData,"ABCDEFGHIJKLMNOPQRSTUVWXYZ");
nl=strlen(szData);
n=Bar2Dpdf(&iCodetype,(LPSTR)szData,&nl, &iFlags, &iColumns, &iLevel,&iMode,(LPSTR)szBarcode);

szBarcode receives the multi-line text that forms the barcode.

The iFlags value may be used in the Unicode version to allow data to be encoded as Unicode, greatly simplifying the encoding of non-western character sets.


Sample code in VB

A typical VB call to the DLL to convert a text string is:

PDfnet1.CodeType = bCode.PDF417
PDfnet1.StartMode = 1     '=1 for Alpha mode
PDfnet1.SecurityLevel = 0
PDfnet1.Caption = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
barcode1.Text = PDfnet1.Barcode()

The barcode text has been copied to a TextBox (barcode1)


Adding to an Access Form or Report

To add the control to an Access Form or Report, open the form or report in Design view and ensure that the Toolbox is visible. Select the “More controls” icon on the Toolbox and then select the PDFOCX Active-X Control module from the list of controls displayed. Draw a rectangle for the control on the from or report.

Once added to a form or report, selection of the control will show the available properties in Access’s properties window. The font should be set by right-clicking on the control and choosing the Pdfocx control properties from the displayed menu.


Using the dFontPDF Java class

The dFontPDF Java class may be used to return strings that contain rows of characters that, when displayed in one of the PDxx fonts form a PDF417 symbol. The class may be used directly or through the dFontPDF.jar provided.

The class is instantiated with the new command:

dFontPDF pdf1=new dFontPDF();

and the required properties set using the setCodeType(), setModeType() and setLevel() methods. The data is supplied to the class using the setCaption() methods and the update() method called to generated the barcode characters.

The number of rows of characters in the resulting barcode may be obtained from the getNStrings() method, and each line of the barcode returned using getBarcodeString(i), eg.

// g is output graphics – screen or printer
// ht is the chose font height in points
// x and y are the top left coordinated required for the symbol
n=pdf1.getNStrings();
for (i=0; i<n; i++)
{ g.drawString(pdf1.getBarcodeString(i),x,(y+i*ht)); }


Licensing

Each kit may be licensed as a single computer product or as a developer version which permits Royalty-free of the components for up to 10,000 distributions.

System requirements

Requires Microsoft Windows 2000/XP/2003/Vista/Windows 7. To obtain printed barcodes a Windows compatible printer is required. One of the tools provided must be used for conversion of data into a barcode.

The 32 bit components may be installed on either 32 or 64 bit systems. 64 bit components require a 64 bit operating system.

Except where otherwise stated, the .NET component is designed for use with Visual Studio 2005/.NET Framework 2.0 or later; and supports x32, x64 and IA64.


*Note
The PDF417 Code UFL for use within Crystal Reports can generate barcodes containing a maximum of 70 characters - the limitation arising from the maximum number of characters that can be returned from a Crystal Reports formula.

Testware versions randomly scramble characters, but otherwise provides a scannable barcode.
The fonts are not suitable for use without the one of the provided components to create the barcode.

All developer font products include an embedding licence so that fonts may be embedded into Acrobat pdf pages (see sample pdf document) or font objects created for embedding barcodes into web pages (see demo page).

View 2D Barcode Font kits help files - see the Home menu above.