The PDF417 barcode encoder class library is written in C#. It is open source code. The target framework is .NET Framework (net462) and .NET Standard (netstandard2.0). The encoder library allows you to create a PDF417 barcode image from a text string or a binary (byte) array. Two demo/test applications are included. Windows form application and console application targeting .NET framework (net462) and .NET Core (netcoreapp2.2). Both allows you to explore the library and produce PDF417 barcodes.
The full article is available at https://www.codeproject.com/Articles/1347529/PDF417-Barcode-Encoder-NET-Class-Library-and-Demo
Both .NET core and .NET standard do not support the Bitmap class included in the System.Drawing assembly. The library includes a PNG image builder that can run in the .NET Standard and .NET core environment. This image is extremely efficient. It takes advantage of the compression and filtering of the PNG standard. Saving barcode image 564 by 232 pixels takes 617 bytes by this software. Using Bitmap with file type PNG takes 16,865. Using Bitmap with file type JPEG takes 21,121 bytes.
PDF417 is a two-dimensional barcode. The barcode documentation and specification can be found in the following websites: Wikipedia provides a good introduction to PDF417. Click here to access the page. The PDF417 standard can be purchased from the ISO organization at this website. An early version of the specifications is freely available to be downloaded at this website. I strongly recommend that you download this document if you want to fully understand the encoding options.
The PDF417 barcode encodes text or binary array of bytes into an image of black and white bars. The attached software converts the text or binary array into a PDF417 barcode Bitmap image. If the input data is a text string it will first be converted to a binary array using ISO 8859-n standard as defined here. The binary array of bytes is converted to codewords. Each codeword is a number in the range of 0 to 928. This conversion process divides the input bytes into segments. There are three types of segments: text, bytes and numeric. Each segment type is compressed: text as 2 data characters per codeword, byte as 1.2 data characters per codeword and numeric as 2.93 data characters per codeword. To ensure barcode integrity, error correction and detection codewords are appended to the data codewords. There are 9 levels of error correction. The codewords are divided into rows and columns. Each codeword is converted to a symbol, sequence of alternating four black and four white bars. A narrow bar is a module. In total there are 17 modules for each codeword. Bar width vary from one to six modules. Each codeword is translated into one of three symbols. Symbol 1 is for row 1, 4, 7 etc. symbol 2 is for row 2, 5, 8 etc. and symbol 3 if for rows 3, 6, 9 etc.
The software attached to this article is a PDF417 Encoder library and two demo/test programs. This article explains how to install the software. How to integrate the encoder library to your application and produce a barcode image. And how to use the demo/test programs.