PDF-417 .NET Barcode SDK for RDLC Reports

Integration & Developer Guide to create PDF-417 barcodes in .NET RDLC local report

Create PDF-417 barcode symbology on RDLC using .NET Barcode Generator

  • Generate PDF-417 on RDLC local reports using .NET barcode generator
  • Complete user-friendly guideline provide & complex barcode know-how is not required
  • Works well in .NET Framework 2.0/3.0/3.5/4.0
  • Microsoft SQL Server 2005, or greater version support
  • Customize RDLC easily at source code level
  • Create ISO compliant accurate PDF-417 based on ISO/IEC 15438
  • Draw PDF-417 in image files as well as the memory for RDLC
  • Reports with barcode images could be exported as PDF or html


Introduction of PDF-417 Barcode Generator for RDLC

Top
PDF-417 barcode control for RDLC is a powerful report tool lets you create robust reporting solution with barcode generation and printing capabilities. This barcode library can be used in VB.NET, C#, Managed C++ and Borland Delphi for .NET.

OnBarcode.com provides PDF-417 Barcode Control for .NET RDLC Local Report and this barcode generation SDK also supports 30+ other linear & 2D barcodes generation for RDLC Local Report. We provide detailed online tutorial: How to create, print barcodes in RDLC reports?
  • Linear Barcodes on RDLC Report: Code 128, EAN-8, PDF-417, GS1 128, UPC-A, UPC-E, Interleaved 2 of 5, MSI Plessey, RM4SCC etc.
  • 2D Barcodes on RDLC Report: including QR Code, Data Matrix, PDF-417.




How to Generate PDF-417 in RDLC Using Barcode Generation SDK

Top
This guide outlines how to generate PDF417 2D barcodes within RDLC Local Reports using C#, optimized for ASP.NET (including ASP.NET web form, MVC) and WinForms (.NET Framework) projects integrated with the ReportViewer Control. In the above tutorials, you will create and print Code 128 barcodes in RDLC reports. Here we will update the demo codes to print PDF-417 barcodes in RDLC reports.

Open file Form1.cs in the Visual Studio
  • Comment out the existing Linear object construction code
  • Create a new PDF417 objec to generate, customize PDF417 in RDLC report
// Linear linear = new Linear();
PDF417 barcode = new PDF417();





PDF417 Barcode Data Encoding in RDLC Local Reports (C#)

Top

PDF417 Valid Character Sets

PDF417 barcodes in RDLC reports support the following character encodings:
  • Full ASCII (128 standard characters)
  • Extended ASCII (values 128–255 per ISO 8859-1)
  • Up to 811,800 distinct character sets or data interpretations
  • Various function codewords for control purposes (compatible with RDLC Custom Code)




PDF417 Encoding Data Modes

PDF417 supports compact encoding modes optimized for different data types in RDLC reports:
  • Auto (default): The RDLC PDF417 library will automatically select the optimized combination of compact modes for you.
  • Text Compaction: Encodes printable ASCII characters (32–126 per ISO/IEC 646 IRV) and selected control characters.
  • Byte Compaction: Encodes all 256 8-bit byte values (supports international character sets for RDLC).
  • Numeric Compaction: Efficiently encodes numeric data strings (ideal for large numeric datasets in RDLC).
The OnBarcode library auto-selects the optimal mode for RDLC, or you can set it explicitly. Try the following C# codes to specify the target data modes in RDLC local report file (.rdlc).

barcode.DataMode = PDF417DataMode.Auto;




PDF417 Maximum Data Length

The maximum data capacity for PDF417 with Error Correction Level 0 in RDLC reports varies by encoding mode:
  • Text Compaction: 1,850 characters
  • Byte Compaction: 1,108 characters
  • Numeric Compaction: 2,710 digits
Note: Higher error correction levels reduce maximum data capacity.

Exceeding these limits triggers PDF417 encoding errors. Use Macro mode (covered later) for large text message.




Encoding Text in PDF417 for RDLC Local Reports (C#)

Top
This section covers encoding different text types (ASCII, Unicode, non-printable characters) into PDF417 barcodes for RDLC reports in ASP.NET and WinForms projects.

Generate PDF417 with ASCII Text (Including Non-Printable Characters)

  • For printable ASCII characters (95 total), directly assign the text to the Data property.
  • For non-printable ASCII characters (33 ASCII control characters):
    • Convert the character to "~ddd" format (where ddd = 3-digit ASCII value, e.g., carriage return = ~013).
    • Enable ProcessTilde = true to let the library parse the "~ddd" format.

barcode.ProcessTilde = true;
barcode.Data = "PDF417~013abc";



Note: Scan the generated PDF417 in the RDLC report viewer (exported as PDF/Excel) to confirm non-printable characters decode correctly.




Generate PDF417 with Unicode Text

  • Enable EncodeUnicodeText = true to support multi-language text (e.g., Chinese, French) in RDLC reports.
  • Ensure the RDLC Font setting (e.g., Arial Unicode MS) supports Unicode characters.
barcode.EncodeUnicodeText = true;
barcode.Data = "你好 hello in Chinese";



Note: Use PDF417 scanner device or software to verify the Unicode PDF417 renders correctly in the ReportViewer Control (WinForms) or browser (ASP.NET).




Other Supported Data Formats for RDLC

  • Binary Data: Encode files (e.g. PDFs) into PDF417 using Byte Compaction mode (ideal for RDLC reports with embedded files).
  • ECI Mode: Support extended character sets (e.g. Arabic, Cyrillic) via ECI (Extended Channel Interpretation) mode.




PDF417 Dimension Settings for RDLC Local Reports (C#)

Top
Optimize PDF417 dimension size for RDLC image report item (avoid distortion in printed/exported reports). Use BarcodeWidth, and >code>BarcodeHeight.

Add the following C# code to the RDLC Barcode ASP.NET or WinForms project.
  • Determine the PDF417 printing size in your .rdlc file (matches BarcodeWidth, BarcodeHeight).
  • UOM to choose the preferred unit of measure inch or cm.
  • BarcodeWidth and BarcodeHeight to specify the PDF417 image rendering size.
barcode.UOM = UnitOfMeasure.INCH;
barcode.BarcodeWidth = 3;
barcode.BarcodeHeight = 1;



Further customize PDF417 dimension size



In the C# PDF417 generator for RDLC, use these properties to customize barcode dimensions:
  • AutoResize: It must be false to enable property X and XtoYRatio.
  • X: Bar module width (minimum value defined by application specs)
  • XtoYRatio: Bar width-to-height ratio (default: 0.3333333f)
  • RowCount: Number of rows (3 - 90)
  • ColumnCount: Number of columns (1 - 30)
  • LeftMargin / RightMargin / TopMargin / BottomMargin: Quiet zone (minimum width = 2X)


Note: Check the RDLC report viewer to confirm the PDF417 barcode dimensions match the configured values (no stretching/compression).

Adjust RowCount / ColumnCount if the encoded data exceeds the current symbol capacity (the barcode library auto-adjusts if needed).




Advanced PDF417 Options for RDLC Local Reports (C#)

Top

PDF417 Error Detection and Correction (ECL)

Every PDF417 symbol in RDLC includes error correction codewords for reliability. The ECL property sets the error correction level (0–8), with higher levels providing better resilience (critical for printed RDLC reports).

Error Correction Level Total Error Correction Codewords
0 2
1 4
2 8
3 16
4 32
5 64
6 128
7 256
8 512


barcode.ECL = PDF417ECL.Level_3;




Generate Compact (Truncated) PDF417 for RDLC

  • Use Truncated PDF417 for RDLC reports with limited space (low risk of symbol damage).
  • Ensure barcode scanners support Truncated PDF417 (verify with your hardware vendor).
barcode.Truncated = true;



Note: Confirm the truncated PDF417 renders correctly in the RDLC report viewer, or printed PDF/Excel file and scans without errors.




Generate Macro PDF417 for RDLC

Macro PDF417 splits large datasets across multiple PDF417 symbols (similar to Structured Append mode in QR Code and Data Matrix), ideal for long RDLC reports with extensive data.

Key Features for RDLC
  • Splits data into blocks across up to 99,999 PDF417 symbols.
  • Includes control information to reconstruct data regardless of scan order.
  • Compatible with RDLC Subreport controls for multi-symbol display.
barcode.Macro = true;
//  File ID is 3. 
barcode.MacroFileIndex = 3;
//  Total 10 segements for the file.
barcode.MacroSegmentCount = 10;
//  This symbol is Segment 2. The first Segment Index is 0
barcode.MacroSegmentIndex = 2;   



Note: Verify all Macro PDF417 symbols render in the RDLC report (use Tablix/List controls for layout) and scan to reconstruct the full dataset.




Summary

Top
  • The core workflow for generating PDF417 in an RDLC Local Report is:
    1. Initialize PDF417 barcode object
    2. Configure PDF417 encoding data and code set
    3. Generate PDF417 barcode byte stream
    4. Bind to RDLC image report item
    5. Render via ReportViewer Control (ASP.NET/WinForms)

  • Critical configurations for RDLC compatibility:
    Encoding mode (DataMode), dimension settings (X, RowCount/ColumnCount), and error correction level (ECL) — all must align with the RDLC Image report item's properties.













Common Asked Questions

What is the use of PDF417 barcode?

PDF417 is a high density, 2-dimensional stacked barcode symbology. "PDF" stands for Portable Data File, and "417" signifies that each pattern in the code consists of 4 bars and spaces in a pattern that is 17 units (modules) long. PDF417 barcodes are used in a variety of industries and applications, such as identification cards, driver's license, airline boarding pass, transport, and inventory management.

Using RDLC Barcode Generator library, you can quickly create, print and insert PDF417 barcodes in RDLC reports in Visual Studio ASP.NET Core, WinForms projects.

What is the maximum capacity of a PDF417?

According to PDF standard (ISO/IEC 15438), the maximum number of characters encodable in a PDF417 barcode with lowest error correction level (0).
  • Text Compaction mode: 1,850 characters
  • Byte Compaction mode: 1,108 characters
  • Numeric Compaction mode: 2,710 characters
We recommend you to choose PDF417 data mode as auto mode, the RDLC barcode library will automatically process the PDF417 encoding text characters and choose the right PDF417 data modes, and print PDF417 on RDLC report viewer in Visual Studio .NET IDE.

What is the aspect ratio of a PDF417?

The aspect ratio of the printed PDF417 barcode shall be defined by two dimensions:
  • X: set the dimension width of the narrowest bar and narrowest space.
  • Y: set the dimension height of the narrowest bar and narrowest space.
An aspect ratio of 2 means that the barcode's bar height (Y) is twice its width. The valid values of aspect ratio is from 2 to 3 (inclusive). In RDLC report designer, you can apply the aspect ratio of PDF417 through properties X and Y.

What is the difference between a PDF417 and a QR Code?

PDF417 and QR Code are both 2D or matrix barcode symbologies. PDF417 is a barcode with linear rows of stacked codewords, and QR Code usually consists of black squares arranged in a square grid on a white background.

PDF417 can be scannable even if up to 50% of it is damaged. QR Code can accept up to 30% damages. RDLC Barcode library supports both PDF417 and QR Code 2d barcode generations in RDLC report designer and report viewer in Windows Forms, ASP.NET Core web and Windows applications.




































Terms of Use | Privacy Policy
Copyright © OnBarcode.com . All rights reserved.