ASP.NET PDF-417 Generator Library SDK

Integration & Developer Guide to create & draw 2D PDF-417 barcode images in ASP.NET web application

Generate barcode PDF-417 images in Visual ASP.NET web application with complete sample .NET source code

  • Generate, draw PDF-417 in Visual ASP.NET applications
  • Easy to install & integrate 2d barcode PDF-417 generation library SDK into ASP.NET developments
  • Generate industry standard linear, 2d barcode types including ASP.NET Data Matrix, ASP.NET QR Code, ASP.NET Code 39, ASP.NET Code 128
  • Generate and create PDF-417 barcode images in ASP.NET class
  • Create barcode PDF-417 in ASP.NET web form application
  • Draw & print PDF-417 in SQL Server Reporting Services (SSRS) & Crystal Reports for ASP.NET projects
  • Easy to encode PDF-417 images to jpeg, gif, png, tiff, bitmap files in ASP.NET program
Here we will learn how to generate and print PDF417 (a 2D stacked barcode symbology) in ASP.NET projects using C# and the OnBarcode Barcode Generator library. It covers end-to-end implementation, from basic barcode generation to advanced encoding, dimension settings, error correction, and special PDF417 modes. All content is optimized for ASP.NET Core, ASP.NET MVC, Razor Pages, and Web API projects.



  • Master PDF417 data encoding rules, supported character sets, compaction modes, and maximum data capacity
  • Encode multiple data types in ASP.NET: ASCII text, non-printable characters, Unicode, binary data, and ECI mode data
  • Configure PDF417 barcode dimensions, margins, modules, and resolution for ASP.NET web display and printing
  • Apply advanced PDF417 settings in ASP.NET: Error Correction Level (ECL), Truncated (Compact) mode, and Macro PDF417

ASP.NET PDF-417 Generator Library Introduction

Top
ASP.NET PDF-417 Generator is one of the barcode generation functions in OnBarcode's Barcode for ASP.NET Generation Controls, which generates & prints PDF-417, Macro PDF-417, Compact PDF-417 (PDF417 Truncated) and 20+ other linear & 2D bar codes in ASP.NET web applications.
This article is providing several methods to use ASP.NET Barcode Generation Control to generate PDF-417 barcodes in ASP.NET web pages, ASP.NET web forms, and ASP.NET classes.

PDF-417 Generators

OnBarcode provides several PDF-417 Generator components and software, such as .NET PDF-417, Java PDF-417, C# PDF-417, VB.NET PDF-417, Android PDF-417, PDF-417 Generator.


Streaming PDF-417 Image into Your ASP.NET Web Pages Using ASP.NET Barcode Generator

Top
  • Under downloaded trial package, copy barcode folder and its contents to your IIS, and create a new virtual directory, named "barcode".
  • Restart IIS, navigate to http://YourDomain:Port/barcode/pdf417.aspx?DATA=012345678.
  • To create barcode image in html or aspx pages, you can insert a image tag (img) into your web pages.
    For example, <img src="http://YourDomain:Port/barcode/pdf417.aspx?DATA=012345678" />

Generate PDF-417 into Your ASP.NET Web Forms

Top
  1. Install ASP.NET Barcode Generator Control.
  2. Add ASP.NET Barcode Generator Control to your Visual Studio ToolBox.
  3. Copy "pdf417.aspx" and "pdf417.aspx.cs" to the folder where your aspx pages are generating barcodes.
  4. Drag and drop "PDF417WebForm" to your ASPX web forms.
  5. Run the website to view the barcodes generated. To customize PDF-417 settings, view PDF-417 barcode settings.

Generate PDF-417 Barcodes in ASP.NET Class Using C# or Visual Basic .NET

Top
If you need generate PDF-417 barcodes in your ASP.NET class using C# or VB.NET, we provides complete barcode generation source code for PDF-417 in C# and PDF-417 in VB.NET.


PDF417 Barcode Data Encoding in ASP.NET



PDF417 Valid Character Set

PDF417 supports extensive character encoding for ASP.NET application requirements:
  • Full ASCII set (128 standard characters)
  • Extended ASCII (values 128–255, ISO 8859-1 compliant)
  • Support for over 811,800 character sets and data interpretations
  • Dedicated function codewords for control operations



PDF417 Data Compaction Modes

PDF417 uses three optimized compaction modes to maximize data efficiency.

Set these via the DataMode property in your ASP.NET code.
  • Text Compaction mode: Encodes all printable ASCII (32–126) and selected control characters
  • Byte Compaction mode: Encodes all 256 8-bit byte values, supporting international character sets
Set DataMode to Auto to let the library automatically select the best mode.


PDF417 Maximum Data Length

Maximum character capacity at Error Correction Level 0:
  • Text Compaction mode: 1,850 characters
  • Byte Compaction mode: 1,108 characters
  • Numeric Compaction mode: 2,710 characters
Note: For data exceeding these limits in ASP.NET, use Macro PDF417 to split data across multiple barcodes.


Encode Multiple Text Types in PDF417 in ASP.NET

This section covers encoding various text formats in ASP.NET PDF417 generation.


Generate PDF417 with ASCII Text (Printable & Non-Printable)

Printable ASCII Characters

Directly assign standard text to the Data property

Non-Printable ASCII Characters

For control characters (e.g., Carriage Return), use the ~ddd format:
  • Convert non-printable characters to 3-digit ASCII values (e.g., CR = 13 > ~013)
  • Enable ProcessTilde = true to activate special character parsing



Note: Always use 3-digit padding for ASCII values (e.g., ~013 not ~13). Incorrect formatting will cause encoding failure.


Generate PDF417 with Unicode Text Encoding

Encode international text (Unicode) in your ASP.NET project with one simple property:
  • Create a PDF417 object
  • Set EncodeUnicodeText = true
  • Assign Unicode text to the Data property



PDF417 Dimension & Size Settings in ASP.NET

Customize barcode size, module dimensions, and margins for your ASP.NET UI or printing needs.

Adjust these core properties for PDF417 dimension control:
  • UOM: Unit of measure (PIXEL, CM, INCH)
  • X: Width of a single barcode module (minimum defined by your spec)
  • XtoYRatio: Width-to-height ratio (default: 0.3333333)
  • RowCount: Number of rows (range: 3 - 90)
  • ColumnCount: Number of columns (range: 1 - 30)
  • LeftMargin/RightMargin/TopMargin/BottomMargin: Quiet zone (minimum: 2X)
  • Resolution: Image DPI (for high-resolution printing)



Advanced PDF417 Options for ASP.NET Projects



PDF417 Error Correction Level (ECL)

PDF417 uses robust error correction for data recovery. Set the ECL property in ASP.NET to adjust fault tolerance:
  • Level 0: 2 error correction codewords
  • Level 1: 4 codewords
  • Level 2: 8 codewords
  • Level 3: 16 codewords
  • Level 4: 32 codewords
  • Level 5: 64 codewords
  • Level 6: 128 codewords
  • Level 7: 256 codewords
  • Level 8: 512 codewords
Higher levels mean better damage resistance, and larger barcode size.


Create Compact (Truncated) PDF417 in ASP.NET

Truncated PDF417 reduces size for space-constrained ASP.NET interfaces:
  • Set Truncated = true to enable compact mode
  • Ideal for low-risk environments where physical damage is unlikely



Create Macro PDF417 Barcodes

Macro PDF417 splits large datasets across multiple barcodes for ASP.NET applications:
  • Supports up to 99,999 linked PDF417 symbols
  • Embeds reconstruction metadata for automatic data assembly
  • Functions like Structured Append for high-capacity data storage
  • Maintains data integrity regardless of scan order



Use this mode when your data exceeds the standard PDF417 character limits.


Summary

You have learned the complete workflow to generate, customize, and deploy PDF417 barcodes in ASP.NET projects using C#.

Main topics
  • Support for ASCII, Unicode, binary, GS1, and ECI data encoding meets all ASP.NET application requirements
  • Full control over dimensions, modules, margins, and resolution for web UI and printing
  • Advanced features (ECL, Truncated, Macro PDF417) solve space and large-data challenges
  • Fully compatible with ASP.NET Core, MVC, Razor Pages, Web API, and standard .NET Core and framework Runtime environments
You can now implement production-ready PDF417 barcode functionality into any ASP.NET web application.







































Start with free trial package:








































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