Reading and decoding PDF-417 barcodes stored in an image or PDF file from within a .NET application

John Rasch picture John Rasch · Mar 2, 2009 · Viewed 20.8k times · Source

I am looking for a .NET library that is able to decode data from a PDF-417 barcode that is embedded either in an image file or PDF. At this point, I have only been able to find a Java version and a C version.

Ideally, this library would be both open-source and free of charge, but I doubt such a decoder exists.

I am open to trying out demos of existing products that you may have had experience with - which leads me to the question - have you had any experience reading PDF-417 barcodes embedded in images or PDFs using .NET, and which of the available products would you recommend to do so?

Answer

Ronnie Barnard picture Ronnie Barnard · Feb 3, 2010

The ClearImage Barcode Recognition SDK for .NET is probably the easiest way to decode PDF 417 and many other barcodes. I use it in many projects... although it is not free

         var bitmap = WpfImageHelper.ConvertToBitmap(_BarcodeCam.BitmapSource);

        _ImageEditor.Bitmap = bitmap;
        _ImageEditor.AutoDeskew();
        _ImageEditor.AdvancedBinarize();

        var reader = new BarcodeReader();
        reader.Horizontal = true;
        reader.Vertical = true;
        reader.Pdf417 = true;

        //_ImageEditor.Bitmap.Save("c:\\barcodeimage.jpg", System.Drawing.Imaging.ImageFormat.Jpeg);

        var barcodes = reader.Read(_ImageEditor.Bitmap);

        if (barcodes.Count() > 0)