Java PDF417 Barcode Generator Library
Create, generate, print PDF 417 2d barcode image using Java API with Java open source example code
How to greate, generate, print PDF 417 2d barcode image using Java API with Java open source example code without using font. Free download.
- Mature and advanced Java component for PDF-417 generation
- Entirely comply with ISO/IEC 15438 (2nd edition 2006-06-01)
- Totally generated and compiled in Java
- Completely compatible with Java SDK 1.4.2 and later version
- Generate PDF-417 barcodes in Java class easily and quickly
- Support adding PDF-417 barcodes in iReport and Eclipse BIRT
- Reset rich parameters of PDF-417 barcode image in Java easily
- Create advanced PDF-417 barcodes in PNG, BMP, GIF and JPEG formats
PDF-417 Barcode Creator for Java Introduction
PDF-417 barcode generator for Java can help users create professional PDF-417 barcodes in Java class. Users can reset the barcode size through changing the properties of barcode width and barcode height. Many other barcode settings are also provided.
PDF-417 Barcode Overview in Java
PDF417 is a continuous 2D symbology which is invented by Dr. Ynjiun P. Wang at Symbol Technologies in 1991. It is primarily used in transport, identification cards and inventory management.
PDF-417 Encodable Characters in Java
- Auto: KeepAutomation will select proper data format according to input data
- Text: each codeword represents one or two characters
- Byte: each group of 5 codewords represents 6 bytes
- Numeric: groups of up to 15 codewords represent as many as 44 decimal digits
PDF 417, also known as Portable Data File 417, PDF 417, PDF417 Truncated, is a stacked linear bar code symbol used in a variety of applications,
primarily transport, identification cards, and inventory management. PDF stands for Portable Data File.
In Java barcode generator library, you can not only generate PDF417 2d barcodes in Java class, but also
other 2d barcodes, such as
generating QR Code,
creating Data Matrix,
and most common linear barcode types in Java, such as
generating Code 39,
generating Code 128,
creating EAN-13,
creating UPC-A in Java program.
PDF-417 Character Set Encoding in Java
PDF-417 encodable characters
PDF417 format supports the following character set and compact modes
- Text Compaction mode permits all printable ASCII characters to be encoded
- Byte Compaction mode permits all 256 possible 8-bit byte values to be encoded
- Numeric Compaction mode permits efficient encoding of numeric data strings.
- Up to 811,800 different character sets or data interpretations
- Several function codewords for control purposes.
PDF-417 maximum data length in Java
Maximum possible number of characters a PDF417 barcode (at error correction level 0).
- Text Compaction mode: 1,850 characters
- Byte Compaction mode: 1,108 characters
- Numeric Compaction mode: 2,710 characters
PDF417 symbol size in Java
- Number of rows: 3 to 90
- Number of columns: 1 to 30
Using Java PDF417 barcode generator API, you need use method setPdf417RowCount() to set the number of rows,
call method setPdf417ColumnCount() to set the number of columns in PDF417 generation in Java class.
PDF-417 Data Mode in Java
PDF417 has defined three high level data encoding modes, each of which defines a particular efficient data encoding.
- Text Compaction mode
- Byte Compaction mode
- Numeric Compaction mode
In Java class, you could specify the PDF data mode using method setPdf417DataMode().
Generate PDF-417 in Java Class
This section provides executable Java demo code for creating PDF-417 2D barcode images in a standard Java Class.
For advanced barcode customization, you can refer to the complete Java PDF-417 Generator Demo Source Code.
- Instantiate the PDF417 barcode object in your Java code
- Set the target data string for encoding into the barcode
- Call the drawBarcode method to generate and export the barcode in your desired format
Configure PDF-417 Error Correction Level (ECL) in Java
PDF-417 barcodes include built-in error correction codewords for data recovery.
At minimum, two error correction codewords are included in every PDF-417 symbol.
This feature works like a backup system for your barcode data: it can detect and fix damaged or unreadable parts.
You can define the Error Correction Level via the ECL property in your Java code.
Note:
Higher ECL values enhance data recovery ability but increase the barcode size, similar to adding more backup layers to a Java data file.
Create Compact (Truncated) PDF-417 in Java
Compact PDF-417 is also referred to as Truncated PDF-417.
You can use this format to reduce the barcode's physical size and save display/storage space.
- Initialize a PDF417 object in your Java code
- Set the barcode data string
- Set the Truncated property to true
- Export the truncated barcode to an image file
Note:
Always use the setTruncated(true) method in Java; direct field assignment is not recommended for Java bean compliance.
Create Macro PDF-417 Barcodes in Java
Macro PDF-417 splits large data files into multiple connected PDF-417 barcodes.
This function is similar to the Structured Append feature in QR Code and Data Matrix 2D barcodes.
It supports up to 99,999 individual PDF-417 symbols for a single large dataset.
- Set the Macro property to true to activate Macro PDF-417 mode
- Assign a unique integer to MacroFileIndex (groups related barcodes together during scanning)
- Set MacroSegmentCount to the total number of data segments
- Set MacroSegmentIndex to the current segment ID (starting from 0 for the first segment)
Note:
Verify that MacroSegmentIndex is less than MacroSegmentCount to avoid invalid barcode configuration in Java.
Frequently Asked Questions
What is the use of PDF417?
PDF417 is used for encoding substantial data in a stacked format and it can hold a large amount of information.
Its applications include driver's licenses, airline boarding passes, transport systems, and inventory management.
In what way are PDF417 and QR Code different?
Both are 2D barcode types. A key difference is their damage tolerance: PDF417 works even if 50% of it is damaged, compared to QR code's 30% limit.
What is the maximum number of characters a PDF417 barcode can store at the lowest error correction level (Level 0)?
- Text Compaction mode: Up to 1,850 characters.
- Byte Compaction mode: Up to 1,108 characters.
- Numeric Compaction mode: Up to 2,710 characters.
What defines the aspect ratio of a PDF417 barcode?
Its aspect ratio is set by the relationship between:
- X: The width of the smallest bar or space.
- Y: The height of a single row.
|