KA.Barcode for .NET WinForms
How to Print PDF-417 in .NET WinForms with Valid Data
Complete PDF-417 source code to generate PDF-417 images using Barcode Generator for .NET Control
  • High-quality controls completely written in managed C#, full integration for .NET
  • Other barcode solutions provided - Excel barcode, .NET barcode, Java barcode, etc.
  • Simple to generate dynamic PDF-417 barcodes into Microsoft .NET Framework Applications
  • Programmatically draw PDF-417 matrix barcodes using C# and VB.NET
  • Generating, printing 2D PDF-417 bar codes in stream object, in graphics object, and image formats
  • Recongize linear & 2D barcodes using barcode Word or ASP.NET barcode
  • Print and save PDF-417 as gif, jpeg, png, tiff, and bitmap files with various image settings
  • Support PDF417 generation in various data formats/types including Byte, Numeric, Text
  • Flexible barcode features to colorize barcoding functionality
  • Compatible with ISO / IEC 15438, absolutely readable for scanners
PDF-417 barcode component API SDK is barcode funtionality of KA.Barcode Generator for .NET WinForms, which allows you to encode valid data for PDF417 and print, integrate high-quality PDF 417 matrix images in .NET Windows Forms, Crystal Reports, C#, VB.NET class library.
This page helps developers to encode Byte, Numeric and Text data in PDF417 and output scannable images for all printers and scanners.
2D PDF-417 Introduction
PDF417, also named as Portable Data File 417, PDF 417, PDF417 Truncated, is a 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, so you can simply any amount of data you want for PDF-417 image implementation & integration in C#.NET environment.
  • The maximum data codeword capacity is 925 codewords.
PDF-417 Data Encoding with C#, VB.NET Class in C#.NET

Install PDF-417 Barcode Generator Control into .NET Projects

  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 coding procedure onto your project to create, insert a PDF-417 barcode image in Windows Forms:
using KeepAutomation.Barcode.Bean;
BarCode pdf417 = new BarCode();
pdf417.Symbology = Symbology. PDF417;
pdf417.CodeToEncode = "C#417Image";
pdf417.X = 2;
Dim pdf417 As KeepAutomation.Barcode.Bean.BarCode = New KeepAutomation.Barcode.Bean.BarCode

pdf417.Symbology = KeepAutomation.Barcode.Symbology. PDF417
pdf417.CodeToEncode = "vb417Generator"
pdf417.X = 2
pdf417.generateBarcodeToImageFile("C://pdf417 _vb.png")

Byte Data Mode for PDF417

If you select PDF417 Byte Compaction Mode, you can 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. Copy the sample codings below to convert alphanumeric data string into a PDF417 barcode image.
pdf417.PDF417DataMode = PDF417DataMode.Byte;
pdf417.CodeToEncode = "417#c";
pdf417.PDF417DataMode = KeepAutomation.Barcode.PDF417DataMode.Byte
pdf417.CodeToEncode = "417#vb"

Numeric Data Mode for PDF417

KA.Barcode Generator for .NET WinForms PDF417 Numeric Compaction Mode permits efficient encoding of numeric data strings. If you want to encode numeric digits only, please select this data mode for better data density. Copy the codings below to transform numeric value into PDF-417.
pdf417.PDF417DataMode = PDF417DataMode.Numeric;
pdf417.CodeToEncode = "417";
pdf417.PDF417DataMode = KeepAutomation.Barcode.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";
pdf417.PDF417DataMode = KeepAutomation.Barcode.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 WinForms will automatically print valid PDF417 images according to your input data.
PDF417 Data Encoding with Drag & Drop BarcodeControl
  1. 1.
    In "Choose Toolbox Items" form, click button "Browse...", and select KeepAutomation.Barcode.Windows.dll.
  2. 2.
    Now a BarCodeControl is added into your toolbox.
  3. 3.
    Drag and drop the BarCodeControl into the Forms and a Codabar image is generated.
  4. 4.
    Find Symbology" in the property panel and select "PDF417".
  5. 5.
    Then input numeric, alphanumeric or ASCII characters in "CodeToEncode" blanket.
  6. 6.
    Click on the barcode image and a PDF417 barcode with valid characters is successfully created!