Problems with QR-Code Recognition
Posted: Tue Sep 18, 2012 9:55 am
Hello, I've some problems with QR-Code Barcode Recognition Plugin.
This is my PDF that contains 4 barcodes and this is my code that read barcodes.
In same case GDPicture recognizes 3 barcode (the 4th is too small but this is not my problem) and in others it recognizes 0 barcodes.
It's a bug on my code?
Thank in advance,
Davide
This is my PDF that contains 4 barcodes and this is my code that read barcodes.
In same case GDPicture recognizes 3 barcode (the 4th is too small but this is not my problem) and in others it recognizes 0 barcodes.
Code: Select all
GdPicturePDF gdPicPdf = new GdPicturePDF();
gdPicPdf.SetLicenseNumber(BarcodeResource.SERIAL_GDPICTURE);
Document doc = new Document();
if (File.Exists(fileSource))
{
if (gdPicPdf.LoadFromFile(fileSource, false) == GdPictureStatus.OK)
{
for (int iPage = 1; iPage <= gdPicPdf.GetPageCount(); iPage++)
{
Page pg = new Page();
gdPicPdf.SelectPage(iPage);
imageId = gdPicPdf.RenderPageToGdPictureImage(dpi, false);
if (imageId != 0)
{
GdPictureImaging gdPicImage = new GdPictureImaging();
gdPicImage.BarcodeQRReaderDoScan(imageId, BarcodeQRReaderScanMode.BestQuality);
gdPicImage.ReleaseGdPictureImage(imageId);
for (int iBarcode = 1; iBarcode <= gdPicImage.BarcodeQRReaderGetBarcodeCount(); iBarcode++)
pg.AddQRCode(new QRCode(gdPicImage.BarcodeQRReaderGetBarcodeValue(iBarcode)));
doc.AddPage(pg);
gdPicImage.BarcodeQRReaderClear();
gdPicImage.Dispose();
}
}
}
}
NOTE : Document, Page and QRCode are my custom Objects
Thank in advance,
Davide