pdf417 troubles

Feb 20, 2014 at 3:46 PM
I'm attempting to write a pdf417 decoder but I am not having any luck. The test images I have are decoded by the online decoder but not by the dll. I was under the impression the pdf417 decoding was going to be improved with 12.0 release.

Are other people having better results? Is there anything else I could do to improve my results. I'm using the code below:
        var filename = args[0];

        var image = new Bitmap(Image.FromFile(filename));
        LuminanceSource source = new BitmapLuminanceSource(image);
        BinaryBitmap bitmap = new BinaryBitmap(new HybridBinarizer(source));
        Reader reader = new PDF417Reader();

        IDictionary<DecodeHintType, Object> hints = new Dictionary<DecodeHintType, object>();

        hints[DecodeHintType.TRY_HARDER] = true;

        Result result = reader.decode(bitmap, hints);
Feb 23, 2014 at 11:33 AM
Please provide some sample images which are working with the online decoder but doesn't work with the dll.
Feb 24, 2014 at 7:07 PM
I have many samples which are mainly scans of my own drivers license which I would rather not post publicly. Here is an example from a previous pdf417 related post on this site, which the online decoder can read, but I can't get the dll to read:


If you'd like one of my DL scans, I can send it to you privately.

Feb 26, 2014 at 7:04 PM
I have no idea at the moment what's wrong with the PDF417 decoder and your sample image.
ZXing.Net is a direct port of the java version of zxing which is the base behind the online decoder (as far as I know).
There shouldn't be such a difference in the results.
I have to do a little bit more debugging to solve it.
Feb 26, 2014 at 7:25 PM
Thanks for looking into this.
Mar 18, 2014 at 10:13 PM
This time it was really hard to find the error in the PDF417 decoder which leads to the differences between java-zxing and ZXing.Net.
At the end it was a copy&paste bug. Really nasty.
It is now fixed with revision 88439
Your sample image can be decoded now successfully.