PDF417 recognition won't work

Discussions about barcode reading and writing
Post Reply
Halla602
Posts: 8
Joined: Wed Jan 02, 2013 4:59 pm

PDF417 recognition won't work

Post by Halla602 » Mon Apr 29, 2013 2:30 pm

Hi, I created a sample using GdPicutre 9.4 version, where I open empty .pdf, create 4 BarCodes (1d, QR, PDF417 & DataMatrix), save the file and then try to process it through BarCode recognition.

However, I am only able to read 1D and QR codes, PDF417 & DataMatrix cannot be found. The project is in C#, here is a sample how i try to find any codes..

Code: Select all

ImageID = Pdf.RenderPageToGdPictureImage(400, true);

status = GdPictureImaging.BarcodePDF417ReaderDoScan(ImageID, BarcodePDF417ReaderScanMode.BestQuality);
                    if (status == GdPictureStatus.OK)
                    {
                      temp_count = GdPictureImaging.BarcodePDF417ReaderGetBarcodeCount();
                      status = Pdf.GetStat();

                      for (int c = 1; c <= temp_count; c++)
                      {
                        string data = GdPictureImaging.BarcodePDF417ReaderGetBarcodeValue(c).ToString();
                        status = Pdf.GetStat();
                        // process data
                      }
And the same way for QR, 1D and DataMatrix, I then format the output and print it. For DataMatrix and PDF417, the temp_count stays at 0, even if they are clearly generated in the input file. When I tried other random online readers, they were able to read the barcodes and retrieve data successfully.



The code for BarCode generating is here, the same pattern is used for QR, 1D and DataMatrix with different EncodingMode enums and other parameters, but simmilar to this.:

Code: Select all

else if (Placement[i].type == Barcode_Subtype.Barcode_PDF417)
              {
                BarcodePDF417EncodingMode EncodingMode = BarcodePDF417EncodingMode.BarcodePDF417EncodingModeText;
                BarcodePDF417ErrorCorrectionLevel CorrectionLevel = BarcodePDF417ErrorCorrectionLevel.BarcodePDF417ErrorCorrectionLevelAuto;

                status = pdf.DrawBarcodePDF417(Data, EncodingMode, CorrectionLevel, 30, 3, 4, 2, Placement[i].X, Placement[i].Y, System.Drawing.Color.Black);
              }

If you can help me find any errors, I would be really glad. I attached the generated file to this post.
Attachments
PDF_barcode.zip
(6.06 KiB) Downloaded 367 times

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: PDF417 recognition won't work

Post by Loïc » Mon Apr 29, 2013 7:10 pm

Hello,

Could you share the whole code used to generate the PDF ?

Kind regards,

Loïc

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: PDF417 recognition won't work

Post by Loïc » Wed May 01, 2013 6:18 pm

Hello,

We've identified and fixed a problem in the 2D barcode generator. The next minor version (9.4.8) will have this problem fixed.

Waiting for, just set the PDF origin to top-left as a workaround.

Kind regards,

Loïc

Halla602
Posts: 8
Joined: Wed Jan 02, 2013 4:59 pm

Re: PDF417 recognition won't work

Post by Halla602 » Thu May 02, 2013 3:30 pm

Thank you very much, when will you release this new version ?

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: PDF417 recognition won't work

Post by Loïc » Tue May 14, 2013 7:55 pm

Hello,

Sorry for the late reply. The new release fixing this issue is available.
Download link: https://www.gdpicture.com/download.php

Best regards,

Loïc

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest