Java Barcode Generator, .NET Barcode Generator for C#, ASP.NET, VB.NET
HOME PURCHASE SITEMAP COMPANY

Home > .NET Barcode > Barcode Generation Guide > .NET PDF 417 Generator for .NET, ASP.NET, C#, VB.NET


Download C#, .NET, VB.NET Barcode

.NET PDF-417 Generator for .NET, ASP.NET, C#, VB.NET

PDF-417 Bar Code Generation Guide in .NET, C#, ASP.NET, VB.NET

  • Easily generate PDF-417 barcodes in .NET applications
  • Compatible with the latest PDF-417 ISO specification [ISO/IEC 15438 (Second edition 2006-06-01)]
  • Generate high quality PDF-417 images in JPEG, GIF & PNG formats
  • 100% build in C#, compatible with .net 2.0 and later version
  • Generate PDF-417 barcodes using C#, VB.NET on ASP.NET or Windows Forms
  • Generate PDF-417 in Crystal Reports using C#, VB.NET
  • Generate PDF-417 in Reporting Service using C#, VB.NET
  • Mature .NET Barcode Generator component since 2003
  • Royalty-free and perpetual developer license


Quick Navigate

 

1. .NET PDF-417 Introduction

PDF-417 is also known as Portable Data File 417, PDF 417, PDF417 Truncated

Compatibility: Barcode for .NET component is compatible with ISO/IEC 15438 (Second edition 2006-06-01)

PDF417, or Portable Data File 417, is a two-dimensional stacked barcode symbology capable of encoding over a kilobyte of data per label. It was developed by Symbol Technologies (1989-1992) and is currently maintained by ANSI / AIM USA.
Large amounts of text and data can be stored securely and inexpensively when using the PDF417 symbology. The printed symbol consists of several linear rows of stacked codewords. Each codeword represents 1 of 929 possible values from one of three different clusters. A different cluster is chosen for each row, repeating after every three rows.



 

2. .NET PDF-417 Basic Characteristics

PDF417 is a bar code symbology with the following basic characteristics:
  1. Encodable character set:
    • Text Compaction mode 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.
    • Byte Compaction mode 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.
    • Numeric Compaction mode permits efficient encoding of numeric data strings.
    • Up to 811 800 different character sets or data interpretations.
    • Various function codewords for control purposes.
  2. Symbol character structure: (n, k, m) characters of 17 modules (n), 4 bar and 4 space elements (k), with the largest element 6 modules wide (m).
  3. Maximum possible number of data characters per symbol (at error correction level 0): 925 data codewords which can encode:
    • Text Compaction mode: 1 850 characters (at 2 data characters per codeword).
    • Byte Compaction mode: 1 108 characters (at 1,2 data characters per codeword).
    • Numeric Compaction mode: 2 710 characters (at 2,93 data characters per codeword)
    At the minimum recommended error correction level, there is a maximum of 863 data codewords which can encode:
    • Text Compaction mode: 1 726 characters (at 2 data characters per codeword).
    • Byte Compaction mode: 1 033 characters (at 1,2 data characters per codeword).
    • Numeric Compaction mode: 2 528 characters (at 2,93 data characters per codeword).
  4. Symbol size:
    • Number of rows: 3 to 90.
    • Number of columns: 1 to 30.
    • Width in modules: 90X to 583X including quiet zones.
    • Maximum codeword capacity: 928 codewords.
    • Maximum data codeword capacity: 925 codewords.
    Since the number of rows and the number of columns are selectable, the aspect ratio of a PDF417 symbol may be varied when printing to suit the spatial requirements of the application.
  5. Selectable error correction: 2 to 512 codewords per symbol
  6. Non-data overhead:
    1. Per row: 73 modules, including quiet zones.
    2. Per symbol: a minimum of 3 codewords, represented as symbol characters.
  7. Code type: continuous, multi-row two-dimensional.
  8. Character self-checking: Yes.
  9. Bi-directionally decodable: Yes.


 

3. .NET PDF-417 Encoding Data Scope

PDF417 Barcode for .NET, ASP.NET supports:
  • all 128 characters of ASCII


 

4. How to Generate PDF 417 Barcode Image in IIS without Visual Studio .NET?

  • Under downloaded trial package, copy barcode folder to your IIS folder, e.g. C:\Inetpub.
  • Create a new virtual directory in IIS, named barcode, and link to the above "barcode" folder.
  • Restart IIS.
  • To test your installation, open your web browser and navigate to
    http://YourDomain:Port/barcode/pdf417.aspx?Data=123456789012
  • To create barcode image in your aspx or html page, you need pass the url to IMG tag src value.

    For example:
    <img src="http://YourDomain:port/barcode/pdf417.aspx?Data=123456789012" />

    Using this method, it will not generate any barcode images in your IIS server side.


 

5. How to Generate PDF 417 Barcode Image through ASP.NET Web Form Control?

  1. Install .NET Barcode Controller to your ASP.NET project.
    1. Add Reference BarcodeLib.Barcode.dll to your project.
      Do not copy the dll to the bin directory, Visual Studio will do so, during project compilation time.
  2. Add barcode library to your Visual Studio Toolbox.
    1. Open Toolbox in Visual Studio. Click menu View, and check submenu Toolbox.
    2. Right click Toolbox, click menu Choose Items...
    3. Goto .NET Framework Components tab.
    4. If no BarcodeLib component found, click Browse... button and select BarcodeLib.Barcode.dll file.
    5. Then sort "Namespace" column, you will find 8 components from BarcodeLib.Barcode.
    6. Check component PDF417WebForm, and its namespace is BarcodeLib.Barcode.PDF417
    7. Click "OK" button, you will find four components under "General": PDF417WebForm.
  3. Go to "barcode" folder in the trial package, copy file "pdf417.aspx" to the same folder as your aspx page, which will generate barcodes.
  4. You can drag PDF417WebForm on your aspx page in design view, change barcode setting through properties window.
  5. Run the project, you will find barcode images generated in your aspx pages.


 

6. How to Generate PDF 417 Barcode Image through .NET Windows Form Control in C# or VB.NET?

  1. Add Reference BarcodeLib.Barcode.dll to your project. Do not copy the dll to the bin directory, Visual Studio will do so, during project compilation time.
    1. In your .NET windows project, right click mouse over Refereces in your Solution Explorer window. Then click menu "Add Reference ...".
    2. Add BarcodeLib.Barcode.dll to your project.
  2. Add barcode library to your Visual Studio Toolbox.
    1. Open Toolbox in Visual Studio. Click menu View, and check submenu Toolbox.
    2. Right click Toolbox, click menu Choose Items...
    3. Goto .NET Framework Components tab.
    4. If no BarcodeLib component found, click Browse... button and select BarcodeLib.Barcode.dll file.
    5. Then sort "Namespace" column, you will find 8 components from BarcodeLib.Barcode.
    6. Check component PDF417WinForm, and its namespace is BarcodeLib.Barcode.PDF417
    7. Click "OK" button, you will find the control under "Common Controls": PDF417WinForm.
  3. Now you can see the component displayed on Toolbox. You can drag PDF417WinForm on your form, change barcode setting through properties widnow.


 

7. How to Generate PDF 417 Barcode Image in .NET, C#, VB.NET class?

  1. Add Reference BarcodeLib.Barcode.dll to your .NET project (ASP.NET website, Forms, any .NET project)
    In your .NET class.
    	BarcodeLib.Barcode.PDF417.PDF417 barcode = new BarcodeLib.Barcode.PDF417.PDF417();
    	
    	barcode.Data = "123456789012";
    	
    	barcode.BarWidth = 2;
    	barcode.BarRatio = 3;
    	barcode.LeftMargin = 0;
    	barcode.RightMargin = 0;
    	barcode.TopMargin = 0;
    	barcode.BottomMargin = 0;
    	
    	barcode.Rows = 0;
            barcode.Columns = 5;
    
            barcode.Mode = BarcodeLib.Barcode.PDF417.CompactionMode.Text;
    
            barcode.ECL = BarcodeLib.Barcode.PDF417.ErrorCorrectionLevel.Level_2;
            
            barcode.Compact = false;
    	
    	// more barcode settings here
    	                        
    	// save barcode image into your system
    	barcode.drawBarcode("c:/barcode.png");
    	
    	// generate barcode & output to byte array
    	byte[] barcodeInBytes = barcode.drawBarcodeAsBytes();
    	
    	// generate barcode to Graphics object
    	Graphics graphics = ...;
    	barcode.drawBarcode(graphics);
    	
    	// generate barcode and output to HttpResponse object
    	HttpResponse response = ...;
    	barcode.drawBarcode(response);
    	
    	// generate barcode and output to Stream object
    	Stream stream = ...;
    	barcode.drawBarcode(stream);
    
Above code written in C# 2005


 

8. How to Save PDF 417 Barcode Images using .NET Barcode Generator Windows Control?

In Windows Controller, just call method SaveAsImage(string filename). e.g. SaveAsImage("C:\barcode.gif");


 

9. .NET PDF-417 Property Settings

  • Set the Data property with the value to encode. Type is string.
    Web Stream URL Parameter: Data.
  • Set the BinaryData property with the binary value to encode. Type is byte[]. Once this property value is not null, barcode library will encode this value instead of property Data's value.
  • Set the Mode property. Default is CompactionMode.Text.
    • CompactionMode.Binary: It allows encoding all 256 possible 8-bit byte values. This includes all ASCII characters value from 0 to 127 inclusive and provides for international character set support
    • CompactionMode.Text: It allows encoding all printable ASCII characters, i.e. values from 32 to 126 inclusive in accordance with ISO/IEC 646, as well as selected control characters such as TAB (horizontal tab ASCII 9), LF (NL line feed, new line ASCII 10) and CR (carriage return ASCII 13)
    • CompactionMode.Numeric: It allows encoding numeric data.
    Web Stream URL Parameter: Mode. Valid values: "binary", "numeric", "text"
  • Set the ECL property. PDF417 Error Correction Level. Default is ErrorCorrectionLevel.Level_2 (2).
    Web Stream URL Parameter: ECL. Valid values: (int)ErrorCorrectionLevel
  • Set the Compact property. Compact PDF417 barcode is area efficient.
    Default is false.
    Compact PDF417 may be used where space considerations are a primary concern and symbol damage is unlikely.
    Web Stream URL Parameter: Compact. Valid values: "true" or "false".
  • Set the ProcessTilde property to true, if you want use the tilde character "~" to specify special characters in the input data. Default is true.
    ~NNN: is used to represent the ASCII character with the value of NNN.
    Web Stream URL Parameter: ProcessTilde. Valid values are: "true", or "false".
  • Barcode Size Settings:
    • Set property UOM (Unit of Measure) for properties BarWidth, BarHeight, LeftMargin and TopMargin.
      Valid values are UnitOfMeasure.Pixel (0), UnitOfMeasure.CM (1), UnitOfMeasure.Inch (2).
      Default is UnitOfMeasure.Pixel (0).
      Web Stream URL Parameter: UOM. Valid values are: 0, 1, 2.
    • Set the BarWidth (for bar cell width). Type is float, and default is 2.
      Web Stream URL Parameter: BarWidth.
    • Set the BarRatio properties. Type is int. Default is 3. Bar cell height = BarWidth * BarRatio.
      Web Stream URL Parameter: BarRatio.
    • Set the Rows properties. The number of data rows in the PDF-417 barcode.
      Type is int. Default is 0. (0 means auto decided by barcode library)
      Web Stream URL Parameter: Rows.
    • Set the Columns properties. The number of data columns in the PDF-417 barcode.
      Type is int. Default is 5.
      Web Stream URL Parameter: Columns.
    • Set the LeftMargin, RightMargin, TopMargin and BottomMargin properties.
      Types are all float. Default are 0.
      Web Stream URL Parameter: LeftMargin, RightMargin, TopMargin, BottomMargin.
    • Set the Resolution property (Value is expressed in DPI - Dots per inch).
      Type is int. Default is 96 dpi.
      Web Stream URL Parameter: Resolution.
  • Set the Format property for barcode image type.
    Type is System.Drawing.Imaging.ImageFormat.
    Default value is ImageFormat.Png.
    Web Stream URL Parameter: Format. Valid values are: gif, jpeg, png, bmp, tiff.


Download C#, .NET, VB.NET Barcode






   Copyright 2010 BarcodeLib.com. Provides High Quality .NET Barcode, Barcode .NET, C# Barcode, ASP.NET Barcode, VB.NET Barcode, PDF 417 .NET, PDF 417 ASP.NET, PDF417 .NET, PDF417 ASP.NET, C# PDF 417, PDF417 C#, VB.NET PDF 417. All rights reserved.