PDF-417 FAQ in C#.NET Barcode Generator DLL

Using C# class method to generate and customize PDF-417 in .NET with barcode control library
Barcode in C# > 2D > PDF417 FAQ
C# Barcode Library SDK to Generate Barcode Image - PDF-417 FAQ in C#
PDF-417 C# barcode component software is entirely managed code written in C# in .NET framework environments and presented as dynamical DLL without being loaded on a form. This barcode DLL is compatible with Visual Studio, WinForms apps, ASP.NET, Crystal Report, Reporting Service, class library and console applications to create dynamically PDF-417 and PDF-417 lists in C#.NET programs with free sample code.
This article tells about detail information about PDF-417 in C#.NET projects and how to set PDF-417 properties using C# class method from the following aspects:
  • Generate PDF-417 Barcode Images Using C# Class - PDF-417 Data Encoding
  • Generate PDF-417 Barcode Images Using C# Class - PDF-417 Special Settings
  • Generate PDF-417 Barcode Images Using C# Class - PDF-417 Adjustment
  • Generate PDF-417 Barcode Images Using C# Class - PDF-417 Image Customization
  • Generate PDF-417 Barcode Images Using C# Class - PDF-417 Solution Project Support
C# Barcode Control SDK to Create Barcode Image - PDF-417 Data Encoding
2D PDF-417 Barcode Valid Data
  • Standard ASCII characters: 0-127 including A-Z, a-z, 0-9, and special characters
  • Extended ASCII characters: 128-255
PDF-417 C#.NET Sample Code:
pdf417. Symbol = BarcodeSymbol.PDF417;
pdf417.BarcodeData = "Terrek PDF417 for C#.NET ";
C# Barcode Control SDK to Encode Barcode Image - PDF-417 Special Settings
PDF-417 Data Mode
The character set of PDF-417 contains three compactions: text compaction (ASCII 0 - 255), byte compaction (ASCII 9, 10, 13 & 32 - 127), and numeric compaction (digits 0 - 9). Terrek.Barcode for C#.NET adds "Auto" data mode for PDF-417 easy and quick generation. Users may set PDF417DataMode property to customize data modes.
PDF-417 C#.NET Sample Code:
pdf417.PDF417DataMode=PDF417DataMode.Auto;
PDF-417 ECL (Error Correction Level)
PDF-417 error correction is based on Reed-Solomon algorithm. It has 8 levels of error correction, the default is level 2. The higher the error correction level is, the less the data can be encoded. Programmers can change the error correction level through PDF417ECL property.
PDF-417 C#.NET Sample Code:
pdf417.PDF417ECL = Terrek.Barcode.PDF417ECL.Level_2
PDF-417 Row & Column Count
The PDF-417 symbol size is related to row count and column count. Row count means the number of rows for PDF417. The value range is from 3 to 90. Column count means number of columns. The value range is from 1 to 30. The PDF-417 size may be changed by adjusting the PDF417RowCount and PDF417ColumnCount settings.
PDF-417 C#.NET Sample Code:
pdf417.PDF417Row=3;
pdf417.PDF417Column=5;
Truncated PDF-417
Truncate PDF-417 barcode is also called Compact PDF-417 barcode, which may omit the right row indicators or reduce some of the row overhead. Compact PDF417 may be used where space considerations are a primary concern and symbol damage is unlikely. Developers may generate truncated PDF-417 by setting PDF417Truncated to true.
PDF-417 C#.NET Sample Code:
pdf417. PDF417Truncated = false;
PDF-417 Tilde Function
Set the Tilde 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.
PDF-417 C#.NET Sample Code:
pdf417. Tilde = true;
C# Barcode Control SDK to Encode Barcode Image - PDF-417 Size Adjustment
PDF-417 UOM (Unit of Measure)
Set property MeasuringUnit for properties BarWidth, BarHeight, MarginL and MarginT. Valid values are PIXEL, CM and INCH. Default is PIXEL. With this UOM setting, users can control the whole barcode size to a unique type.
PDF-417 C#.NET Sample Code:
pdf417.MeasuringUnit = MeasuringUnit.PIXEL;
PDF-417 Module Size
PDF-417 bar size refers to the BarWidth. Bar height is not presented, but Terrek uses WidthVSHeight to specity bar height. With the ImageResize applied, image size are changed according to the customization of bar width and wide to narrow ratio.
PDF-417 C#.NET Sample Code:
pdf417.ImageResize = true;
pdf417BarWidth = 3;
pdf417.WideVSNarrow=0.4;
PDF-417 Margin Size
Increasing the width of margins around the symbol is one way to enhance the readability of the PDF-417 barcode image. The barcode control library set the left, right, top, and bottom margins separately with float values. The default value is 0.
PDF-417 C#.NET Sample Code:
pdf417. MarginL = 8;
pdf417. MarginR = 8;
pdf417. MarginT = 8;
pdf417. MarginB = 8;
C# Barcode Library DLL to Create Barcode Image - PDF-417 Image Customization
PDF-417 Image Format
PDF-417 is generated as image in C#.NET projects with Terrek.Barcode library SDK. The type is System.Drawing.Imaging.ImageFormat. The valid image format values are Gif, Tiff, Bmp, Png, Jpeg, etc. Please ensure the accordance of image format and suffix of image file name.
PDF-417 C#.NET Sample Code:
pdf417.BarcodeFormat = System.Drawing.Imaging.ImageFormat.Jpeg;
pdf417.drawBarcode("C:\\datamatrix.jpeg");
PDF-417 Image Resolution
DPI (Dots per inch) is used commonly as the measure of printing resolution. The resolution of image generated by pdf417generator could be managed with DPI. The type is int, default value is 96 dpi. Users can change the resolution via DotsPerInch property.
pdf417 C#.NET Sample Code:
pdf417.DotsPerInch = 96;
pdf417 Image Placement
The created pdf417 is flexible to change the placement in C#.NET projects. By customizing the BarAlign properly, the image is presented left, right or center in documents or projects. By changing Rotation property, the image can be rotated to 90, 180, and 270 degrees. The default is 0 degree.
pdf417 C#.NET Sample Code:
pdf417.Rotation = Rotation.Degree90;
pdf417.BarAlign = BarAlign.Right;
pdf417 Image Color
It is able to change barcode colors with barcode control library DLL using C#.NET class. Both background color and foreground color are easy to be changed by manipulating ImageColor and BarColor respectively. The default color is white and black.
pdf417 C#.NET Sample Code:
pdf417. ImageColor = Color.White;
pdf417. BarColor = Color.Black;
C# Barcode Library DLL to Create Barcode Image - pdf417 Development Environments
Using C# programming to create pdf417 images, there are a lot of development platforms can be implemented this barcode solution. See guide to create barcode images in C#.NET projects. And the following projects can be adopted to fulfill your pdf417 barcode images in .NET projects.
  • Windows Forms Application (design-time and runtime support)
  • Console Application (runtime support)
  • Class Library (runtime support)
  • Windows Service (runtime support)
  • ASP.NET Applications (design-time and runtime support)
  • Web Service (runtime support)
  • Crystal Report for .NET (runtime support)
  • Reporting Service Applications (design-time and runtime support)