Java PDF 417 Generator Data Encoding Tutorial

sample source code to input valid data and generate 2D PDF 417 images in Java


  • Easy encapsulation, integration and customization are supported with JavaBean conforming to a particular convention under a developmental environment
  • Class library contains all necessary class files for java barcode generation
  • Compatible with Headless Java, in which images can be generated without a graphic environment in JDK 1.4 and above
  • Easy integration with Oracle Reports
  • Developer Guide is written and included in Java barcode creator trial package to generate barcode in your Java program easily
  • Complete Library Source code for Java Barcode is provided with purchase of Unlimited Developer License with Source Code
  • Set proper data length to generate and create valid PDF 417 barcodes in Java applications

Onbarcode's Java Barcode Generator for PDF 417 contains three main setting pages including PDF 417 data setting.

Refer to Java PDF 417 size setting to know more details on how to adjust the PDF 417 image size using Java.

Refer to Java PDF 417 image setting to know more details on how to adjust the PDF 417 valid data using Java.


Java PDF 417 Generator Required Information for Data Encoding

Java PDF 417 supports changing the size of measure unit, image width and height, bar module size and margins and allows orientation to be changed among 0, 90, 180 or 270 degrees. Using this product, PDF 417 may be easily created in Java applications, Java Class, J2EE web applications as well as in Java Reporting projects.

PDF 417 Introduction

PDF 417, also known as Portable Data File 417, PDF 417, PDF417 Truncated, is a stacked linear barcode symbol format used in a variety of applications, primarily transport, identification cards, and inventory management. PDF stands for Portable Data File. The 417 signifies that each pattern in the code consists of 4 bars and spaces, and that each pattern is 17 units long.

Valid Data Set to Encode PDF 417 in Java

  • Standard ASCII Characters: 0-127;
  • Extended ASCII Characters: 128-255.

Valid Data Length in Java

As one of the three 2D barcode generator, Java PDF 417 is also can encode variable data length to make superb quality 2D barcode PDF 417 images in Java development.



Java PDF 417 Data Encoding Details

For PDF 417 data encoding with Java, there are four data modes for various data encoding requirement to choose to set as following.

Encode Only Text Data for Java PDF 417

Text Compaction mode of Java PDF 417 generator permits all printable ASCII characters to be encoded, i.e. values 32 - 126 inclusive in accordance with ISO/IEC 646 (IRV), as well as selected control characters.

      DataMatrix barcode = new DataMatrix();
barcode.setData("Java-Pdf417");

Encode Only Byte Letters for Java PDF 417

Byte Compaction mode of PDF 417 permits all 256 possible 8-bit byte values to be encoded. This includes all ASCII characters value 0 to 127 inclusive and provides for international character set support.

      DataMatrix barcode = new DataMatrix();
barcode.setData("Onbarcode");

Encode Only Numeric Digits for Java PDF 417

Numeric Compaction mode of Java PDF 417 permits efficient encoding of numeric data strings.

      DataMatrix barcode = new DataMatrix();
barcode.setData("417417417");

Encode Auto Data Mode for Java PDF 417

Auto data mode is de the default data mode for 2D barcode PDF 417 generation in Java programming and can encode all ASCII data to create PDF 417 images in Java.

      DataMatrix barcode = new DataMatrix();
barcode.setData("PDF 417");


Java PDF 417 in Java Character Storage

The storage capability of each PDF 417 valid data set can be shown as following.

  • Text data: 1,850 characters

  • Byte data: 1,108 characters

  • Numeric data: 2,710 characters




OnBarcode is a market-leading provider of barcode imaging generator, reader controls and components for ASP.NET, Windows Forms, WPF, as well Java, Android, iOS (iPhone, iPad) across all major enterprise development platforms. We provides comprehensive tutorials and how-tos for various linear, 2d barcode information, such as C# in ASP.NET, C# .NET, C# Barcode Encoding, C# Barcode Image, VB.NET in ASP.NET, VB.NET Winforms, VB.NET Barcode Encoding. OnBarcode barcode products are supported by RasterEdge ASP.NET Document Viewer, which supports ASP.NET PDF Viewer, ASP.NET MVC Document Viewer, ASP.NET PDF Editor, MVC PDF Viewer. And provide high quality C# Convert PDF to Tiff, C# Convert PDF to Word, C# Convert PDF to HTML, C# Convert PDF to Jpeg images, and their easy and simple documents, like C# PDF SDK, C# extract text from PDF, C# Compress PDF, Print PDF in C# and C# extract image from PDF.
Terms of Use | Privacy Policy
Copyright © OnBarcode.com . All rights reserved.