How to create, print PDF417 in SSRS Reports in ASP.NET, WinForms application?

Create PDF417 Barcodes in SSRS Reports Projects Using .NET Control

Generate & print PDF 417 barcodes in SQL Server Reporting Services 2005, 2008, 2008R2, 2012, 2014

  • Generate PDF-417 barcodes in Microsoft SQL Server Reporting Services (SSRS) reports.
  • Using Barcode Custom Report Item (CRI) to draw a PDF-417 bar code.
  • Drag & drop PDF-417 barcode report item to your Reporting Service report layout page.
  • Completely developed in C# managed code with digital signature.
  • Fully compatible with SQL Server Reporting Services 2005 and 2008 versions.
  • Reliable & mature PDF417 barcode generation for Reporting Service using .NET Barcode Generator.
Here we will learn how to generate PDF417 barcode (a 2D stacked linear barcode symbology) in your SQL Server Reporting Service (SSRS) reports in C# .NET projects.
  • Step-by-step instructions to generate PDF417 barcodes in SSRS Paginated Reports using SSRS PDF417 barcode libraries.
  • All PDF417 property settings are configured exclusively in the Report Item Property pane during report design in SSRS.
  • Coverage of PDF417 data encoding (character sets, data modes, maximum length), dimension settings, error correction, and advanced options (Compact PDF417, Macro PDF417).




PDF417 Barcode Data Characters Encoding in SSRS Reports

PDF417 supports a wide range of character sets, making it ideal for various SSRS report use cases (e.g., retail labels, healthcare reports, logistics documents). Let's break down the encoding details for SSRS integration.



Valid Character Sets

PDF417 can encode the following character sets, all compatible with SSRS dataset fields:
  • Full ASCII (128 characters). Works with most standard SSRS dataset fields (e.g., text, numbers, symbols).
  • Extended ASCII (values 128-255, per ISO 8859-1). Useful for international SSRS reports with special characters.
  • Up to 811,800 different character sets or data interpretations. Supports complex data requirements in enterprise SSRS projects.


Data Encoding Modes

PDF417 offers three compact encoding modes to optimize data density. Perfect for SSRS reports with limited space. You can set the mode manually or let the library auto-select it via the Report Item Property pane.
  • Text Compaction mode: Encodes all printable ASCII characters (values 32-126, per ISO/IEC 646) and selected control characters. Ideal for SSRS reports with plain text data (e.g., product descriptions).
  • Byte Compaction mode: Encodes all 256 8-bit byte values (ASCII 0-127 and extended characters). Great for SSRS reports with international character sets or binary data.
  • Numeric Compaction mode: Efficiently encodes numeric data strings. Perfect for SSRS reports with large numeric values (e.g., inventory counts, serial numbers).
To set the encoding mode in your SSRS report:
  • Set DataMode to PDF417DataMode.Auto to let the library choose the optimal mode for your SSRS dataset data (recommended for most SSRS projects).


Maximum Data Length

The maximum data length for PDF417 depends on the encoding mode (at error correction level 0), which impacts how much data you can include in your SSRS report's barcode:
  • Text Compaction mode: Up to 1,850 characters. Suitable for SSRS reports with detailed text data.
  • Byte Compaction mode: Up to 1,108 characters. Ideal for SSRS reports with binary or extended ASCII data.
  • Numeric Compaction mode: Up to 2,710 digits. Perfect for SSRS reports with large numeric datasets (e.g., batch numbers, order IDs).


Note: If your SSRS dataset data exceeds the maximum length for your chosen mode, the library will either switch modes (if DataMode is set to Auto) or throw an error. Test this during report design.


Encoding Various Text Formats in PDF417 for SSRS Reports

PDF417 supports multiple data text types, which is essential for different SSRS report use cases. Let's cover how to encode each type in your SSRS report.


ASCII Text (Including Non-Printable Characters)

Encoding printable ASCII text in PDF417 for SSRS is simple:
  • Set the Data property to the printable ASCII text (bind to an SSRS dataset Field).
For non-printable ASCII characters (e.g., carriage return, tab) in SSRS reports:
  • Convert the non-printable character to a string in ~ddd format, where ddd is the 3-digit ASCII value (e.g., carriage return = ~013).
  • Check ProcessTilde to true. This tells the library to interpret the ~ddd format.



Note: Ensure your barcode scanner is configured to process non-printable characters when scanning SSRS reports with this encoding.


Unicode Text

For SSRS reports with multi-language text (e.g., Unicode), follow these steps to encode Unicode in PDF417:
  • Set EncodeUnicodeText to true. This tells the library the Data property contains Unicode text.
  • Set the Data property to the Unicode text (bind to an SSRS dataset Field with Unicode values).



Other Data Formats

PDF417 supports additional data formats useful for SSRS reports, including:
  • Binary data: Encode files or binary values from SSRS datasets (use Byte Compaction mode).
  • ECI mode: Support for international character sets beyond ISO 8859-1 (ideal for global SSRS projects).



PDF417 Barcode Dimension (Width and Height) Settings in SSRS Reports

You can fully customize the size of your PDF417 barcode to fit your SSRS report's layout. All dimension settings are configured in the Report Item Property pane of the Image control. Here's the list of property settings in SSRS report.
  • UOM (Unit of Measure): Choose PIXEL, CM, or INCH. Match this to your SSRS report's unit settings for consistency.
  • X: Width of the bar module (minimum width is defined by your application's specifications).
  • XtoYRatio: Ratio of bar width to bar height (default value is 0.3333333f).
  • RowCount: Number of rows (range: 3 to 90). Adjust based on your SSRS report's vertical space.
  • ColumnCount: Number of columns (range: 1 to 30). Adjust based on your SSRS report's horizontal space.
  • Margins (LeftMargin, RightMargin, TopMargin, BottomMargin): Quiet zones (minimum width is 2X. Critical for scannability).
  • Resolution: Set the image resolution (e.g., 300 DPI) to match your SSRS report's Rendering requirements (e.g., high-resolution for print reports).



Note: Insufficient quiet zones (less than 2X) will make the PDF417 barcode unreadable after Report Deployment to the SSRS Web Portal.


Advanced PDF417 Options in SSRS Reports

Let's cover advanced features to enhance your PDF417 barcodes in SSRS reports, including error correction, Compact PDF417, and Macro PDF417.


Error Detection and Correction (ECL)

PDF417 includes built-in error correction codewords to ensure scannability even if the barcode is damaged. This is critical for SSRS reports used in harsh environments (e.g., warehouse labels).
  • Each PDF417 symbol has at least two error correction codewords.
  • Use the ECL property (configured in the Report Item Property pane) to set the error correction level (0 to 8).
  • Higher levels provide more error correction but increase the barcode size. Balance this with your SSRS report's layout.
Error correction levels and corresponding codeword counts (for reference):
  • Level 0: 2 error correction codewords (minimum protection)
  • 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 (maximum protection)


Note: For SSRS reports that will be printed and exposed to wear (e.g., shipping labels), use a higher error correction level (4 or above) to ensure scannability.


Compact (Truncated) PDF417

Compact PDF417 (also called Truncated PDF417) is a smaller version of PDF417, ideal for SSRS reports with limited space (e.g., small product labels).
  • Use this option only if space is a primary concern and the barcode is unlikely to be damaged (e.g., indoor SSRS reports).
  • To enable Compact PDF417, set the Truncated property to true in the Report Item Property pane.



Note: Compact PDF417 has reduced error correction. Avoid using it for SSRS reports that will be exposed to damage or harsh conditions.


Macro PDF417

Macro PDF417 allows you to split large data into multiple PDF417 barcodes. Perfect for SSRS reports with large datasets (e.g., long documents, batch data).
  • This feature is similar to Structured Append in other 2d barcode symbologies, such as QR Code, Data Matrix.
  • Each Macro PDF417 symbol contains control information to reconstruct the original data, regardless of scanning order.
  • You can use up to 99,999 individual PDF417 symbols to encode a single data file.
  • For SSRS reports, bind each symbol to a segment of your dataset using a Calculated Field or Expression.



Note: Ensure all Macro PDF417 symbols in your SSRS report have consistent control information (e.g., file ID) to avoid reconstruction errors.


Summary

This guide provides a complete workflow for generating PDF417 2d barcodes in SQL Server Reporting Service (SSRS) reports in C#.NET project. Every aspect of PDF417 implementation in SSRS reports is included, from basic generation and data encoding to advanced features like error correction, Compact PDF417, and Macro PDF417.












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 SQL Server Reporting Services Barcode Generator library, you can quickly create, print and insert PDF417 barcodes in SSRS 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 SQL Server Reporting Services barcode library will automatically process the PDF417 encoding text characters and choose the right PDF417 data modes, and print PDF417 on SSRS 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 SQL Server Reporting Services 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. SQL Server Reporting Services Barcode library supports both PDF417 and QR Code 2d barcode generations in SSRS report designer and report viewer in Windows Forms, ASP.NET Core web and Windows applications.







































Start with free trial package:








































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