KA.Barcode Generator for .NET Suite
How to Print PDF-417 in C# with Valid Data
Complete C#.NET source code to generate PDF-417 images using Barcode Generator for .NET Control
  • Full integration into .NET development environments like Microsoft Visual Studio 2005, 2010, etc.
  • Detailed generation guide for printing, generating scannable PDF 417 images in Visual C#.NET programming
  • Stream, display scannable PDF417 matrix barcode images in ASP.NET web pages, Windows applications, etc
  • Data Matrix Java, Codabar VB.NET, C# EAN 128, UPC-A Excel and other linear & 2D barcode control provided
  • Drawing, printing PDF-417 2d barcodes in SQL Server Reporting Services and Crystal Reports
  • Multiple data formats to choose for PDF417 barcoding including Byte, Numeric, Text and Auto
  • Easy to encode upper-case & lower-case letters, numeric digits and special characters
  • Compatible with latest PDF 417 ISO+IEC+15438 specifications to ensure image scannability
  • Implementing dynamic barcodes, like Word Code 128, C# Code 39, VB.NET Interleaved 2 of 5, Code 128 Excel in your projects
  • Create, insert PDF 417 matrix bar code images in ASP.NET web applications
KeepAutomation Barcode Generator for .NET Suite is a professional barcoding component SDK library for PDF 417 barcode generation & integration in ASP.NET, WinForms, C#, VB.NET. Here are two more tutorials with C# examples for you to create, resize pdf417 barcodes, and to save images locally in png, jpg, tiff, bmp file formats.
PDF-417 Introduction
PDF417, also named Portable Data File 417, PDF 417, PDF417 Truncated, is a 2-dimensional stacked barcode symbol used mainly in transport, inventory management and identification cards.

Valid Data

  • ASCII: values 0-127 (in accordance with ISO/IEC 646), including 0-9, A-Z, a-z and special characters like - (dash), $ (dollar), : (colon), / (slash), . (point) and + (plus), etc.

Valid Length

  • A PDF-417 barcode is variable-length.
  • The maximum data codeword capacity is 925 codewords.
PDF-417 Data Encoding in KA.Barcode Generator for .NET Suite

Install KA.Barcode Generator for .NET Suite into Project

  1. 1.
  2. 2.
    Add Reference: Add "KeepAutomation.Barcode.Window.dll" to your .NET WinForms project reference.
  3. 3.
    Add to Toolbox: Add BarCodeControl to your .NET Visual Studio toolbox.
Copy the following C#.NET sample codings onto your project to create, produce a PDF-417 barcode image
using KeepAutomation.Barcode.Bean;

BarCode pdf417 = new BarCode();
pdf417.Symbology = KeepAutomation.Barcode.Symbology.PDF417;
pdf417.CodeToEncode = "C#417Image";
pdf417.X = 2;
pdf417.generateBarcodeToImageFile("C:/pdf417_csharp.png");

Byte Data Mode for PDF417

KeepAutomation PDF417 Byte Compaction Mode allows you to encode all 256 possible 8-bit byte values. This includes all ASCII characters value 0 to 127 inclusive and provides for international character set support.
pdf417.PDF417DataMode = PDF417DataMode.Byte;
pdf417.CodeToEncode = "417#c";

Numeric Data Mode for PDF417

PDF417 Numeric Compaction Mode permits efficient encoding of numeric data strings.
pdf417.PDF417DataMode = PDF417DataMode.Numeric;
pdf417.CodeToEncode = "417";

Text Data Mode for PDF-417

Text Data Mode for PDF417 permits all printable ASCII characters to be encoded, such as values 32-126 inclusive in accordance with ISO/IEC 646 (IRV), as well as selected control characters.
pdf417.PDF417DataMode = PDF417DataMode.Text;
pdf417.CodeToEncode = "417Text";
Note: If you are not sure which data mode is proper for your encoding data, you can select PDF417 Auto mode, KA.Barcode Generator for .NET Suite will automatically print valid PDF417 images according to your input data.