The PDF417 barcode is a two-dimensional (2D), high-density symbology capable of encoding text, numbers, files and actual data bytes. This FAQ provides information and answers to commonly asked questions.
Large amounts of text and data can be stored securely and inexpensively when using the PDF417 barcode symbology. The printed symbol consists of several linear rows of stacked codewords. Each codeword represents 1 of 929 possible values from one of three different clusters. A different cluster is chosen for each row, repeating after every three rows. Because the codewords in each cluster are unique, the scanner is able to determine what line each cluster is from.
PDF417 uses Reed Solomon error correction instead of check digits. This error correction allows the symbol to endure some damage without causing loss of data. AIM standards recommend a minimum error correction level of 2. The error correction level depends on the amount of data that needs to be encoded, the size and the amount of symbol damage that could occur. The error correction levels range from 0 to 8. The chart below indicates the number of error correction codewords that are added to the printed symbol and AIM recommendations for the EC level.
Fig. 1: AIM recommended EC levels
|EC Codewords Generated||2||4||6||8||16||32||64||128||512|
|Data Bytes Encoded||1-56||57-192||193-384||385-1035|
Barcode Integration Guides are also available that offer one or more integration options. These options may be examined to determine the best implementation method. A few of the guides offered include the following:
Barcode products generate images according to the pixels of the target device thereby creating an image difference. Consequently, it may be necessary to check the X or Y dimensions. Images and symbol sizes may differ slightly with various screen resolutions and printers.
To find the printed Y dimension
To find the printed X dimension
It is recommended to limit the amount of data in each 2D barcode symbol to 800 characters or less, using 20 columns or less. Although the specification states that "up to 1100 bytes or 1800 ASCII characters can be encoded in a PDF417 symbol," it is not usually achievable. The amount of data that can be encoded will vary depending upon the type of data, the compaction type, the error correction level chosen and the limitation of the scanner being used. For example, in text compaction mode, the amount of compaction varies due to mode switching between different types of characters, such as between numbers, upper case, lower case and punctuation. In addition, many PDF417 CCD scanners do not reliably read more than 800 to 850 characters and some scanners have limits of only 300 characters.
If it is necessary to encode more than 800 characters, IDAutomation recommends using Macro PDF mode or multiple separate symbols. In the best-case scenario, using the text encoding mode of the IDAutomation PDF417 Forms Control with the IDAutomation 2D Barcode Scanner, up to 1200 characters were successfully encoded and retrieved.
Each codeword represents 1 of 929 possible values, which allows data to be compacted into the codewords to save space. PDF417 has three data compaction modes: byte, text and numeric. Binary compaction encodes actual bytes of data; text mode encodes most characters on the U.S. keyboard. Numeric compaction encodes only numbers, is rarely used and not available in all products due to calculation limitations. The chart below shows more details about these modes.
|Compaction Type||Data Encoded||Maximum Compaction|
|Binary Compaction||ASCII 0 to 255||1.2 bytes per codeword|
|Text Compaction||ASCII 9,10,13 & 32-127||2 characters per codeword|
|Numeric Compaction||only numbers 0-9||2.9 digits per codeword|
The amount of data compaction will vary depending upon the type of data that is being encoded and the error correction level chosen. If the scanner supports it, smaller symbols may be obtained by performing any of the following:
PDF417 allows ASCII functions to be easily encoded for various operations such as encoding tabs and returns. Normally, these characters are not visible unless an application is used such as IDAutomation's Barcode Scanner ASCII String Decoder, which displays these hidden functions as tags. In all IDAutomation products, the tilde (~) may be used to encode ASCII functions. For example; ~009 is used to encode a tab and ~013 encodes a return. In many development environments, Chr or Char may also be used to encode the ASCII value directly. For example, the programming examples below encode "PDF" <tab> 417:
Java: DataToEncode= "PDF" + (char)9
Visual Basic: DataToEncode= "PDF" & Chr(9) & "417"
FedEx uses a combination of Code 128 and PDF417 barcodes on packing slips to automate delivery and tracking. FedEx publishes a FedEx Ground Multicode Barcode Label Guide and a Barcode and Label Layout Specification Guide that should always be examined when implementing FedEx label applications.
The following is a summary of the PDF417 barcode requirements for FEDEX label printing:
NOTE: The code supplied below is an example and not a complete solution. More information about structuring messages to meet FedEx label specifications may be found at the FEDEX web site.
char GS = (char)29; char RS = (char)30; char EOT = (char)4; rm.setData("[)>"+RS+ "01"+GS+ "9633626"+GS+ "840"+GS+ "002"+GS+"12345678901"+GS+"RPSC"+GS+"0988443"....
Visual Basic Example:
Dim NewMessage As String Dim GS As String Dim RS As String Dim EOT As String GS = Chr(29) RS = Chr(30) EOT = Chr(4) NewMessage = "[)>" + RS + "01" + GS + "9633626" + GS + "840" + GS + "002" + GS + "12345678901" + GS + "RPSC" + GS + "0988443"... PDF4171.DataToEncode = NewMessage
IDAutomation PDF417 barcode products all support the format ~ddd to specify the ASCII code of the character to be encoded, which allows easy encoding of GS, RS and EOT from the command line.
For example, the following string:
"[)>"+RS+ "01"+GS+ "0133626"+GS+ "840"+GS+ "002"+GS...
May also be encoded with this string:
Before implementing the printed PDF417 barcodes for FedEx applications, it is recommended to verify the symbol with the Print Quality Assessment test of the IDAutomation 2D Barcode Scanner or another suitable verifier. Additionally, the Metrologic Focus Scanner together with the Free Barcode Scanner ASCII String Decoder may be used to view the non-printable RS, GS and EOT lower ASCII functions, which will appear as tags. To perform the test, simply open the Barcode Scanner ASCII String Decoder and scan a MaxiCode symbol with the Image Reader.
It is possible to scan and encode international and extended characters, provided the instructions below are followed:
The most common method of reading barcodes is with a PDF Capable Barcode Scanner such as the IDAutomation 2D Barcode Scanner with PQA, which reliably reads the IDAutomation PDF417 Font when printed as small as 3 points, which is an X-dimension of only 5 mils. Most of the hand-held barcode imagers recommended by IDAutomation perform keyboard emulation and receive power from the USB port, so that no external power supply is needed. When a barcode symbol is read using keyboard emulation, the data appears at the cursor as if it had been typed in from the keyboard.
In some cases, it may be desired to have the scanner trigger a form or action in an application. IDAutomation has documented easy methods of accomplishing this in the USB Barcode Scanner Application Integration Guide.
Printed symbols may be easily verified with the Print Quality Assessment test found in the IDAutomation 2D Barcode Scanner. The quality assurance test will grade the symbol and report the X dimension, Y dimension and any possible problems. The report below was generated when scanning the PDF symbol to the right with PQA enabled:
>> PQA << PDF417: 10 rows x 3 cols, 22 data & 8 chks (ECL = 2) X roughly = 0.009" [A] < Row Height = 3.1 X [A] < Useful Row Height = 2.4 X (76% Row) [A] < Data Safety Margin = 100% (0 Erasures & 0 Errors) [A] < Edge Accuracy = 72% [A] < Print Growth = +1% of X
MacroPDF417 is an implementation of PDF417 capable of encoding very large amounts of data into multiple PDF417 barcodes. These multiple barcodes are then scanned by a MacroPDF enabled scanner, which reassembles them into one string of data. Each MacroPDF barcode segment shares a file ID with the other segments, which make up the entire barcode sequence. If the file ID is not the same, the scanner will assume that each of the segments belong to a different barcode sequence. In order for the scanner to reassemble the barcode in the correct order, each segment of the barcode must have a unique segment index, starting at zero. This unique segment index allows the scanner to know how to reassemble the barcode segments, and allows reading symbols in non-sequential order.
2D products that generate MacroPDF417 symbols:
Scanner that reads and assembles MacroPDF symbols:
MacroPDFEnable = True
MacroPDFFileID = 237
MacroPDFSegmentIndex* = 0
MacroPDFLastSegment = False
MacroPDFEnable = True
MacroPDFFileID = 237
MacroPDFSegmentIndex* = 1
MacroPDFLastSegment = True
If assistance is needed, please contact IDAutomation.
| ©Copyright 2017
IDAutomation.com, All Rights Reserved.
Barcode Fonts | Components | Scanners | Support | Contact Us
Over 70% of Fortune 100 companies use IDAutomation's products to automate their businesses.