Barcode1DReaderDoScan does not find all barcodes

Discussions about barcode reading and writing
Post Reply
BenV
Posts: 21
Joined: Thu Dec 02, 2010 4:54 pm

Barcode1DReaderDoScan does not find all barcodes

Post by BenV » Thu May 16, 2013 1:35 pm

monster Hi,

I'm trying to read the barcode of PDF documents. Most of them are read perfectly, but there's one particular barcode that doesn't seem to work. It has the following syntax: IR-[99999999]-[9999]-QESH-V4. Every PDF with a barcode of that syntax fails to be read. Other barcodes look like this: IR-[99999999]-[9999]-HPL-V4 or IR-[999999]-[9999]-V4 or... and they do work. I've also tried to read them with the barcode scanner sample application, same result. Can someone please figure out why that barcode fails? I've also tried functions like ConvertTo1Bpp and AutoDeskew. The image of the PDF is 300DPI.

The PDF file is attached.

Thank you very much.
PDF doc.zip
This zip contains the PDF document
(54.47 KiB) Downloaded 620 times

Code: Select all

Private Sub OpenToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OpenToolStripMenuItem.Click
CloseCurrentImage()
GdViewer1.ZoomMode = ViewerZoomMode.ZoomModeFitToViewer
Dim openFileDialog As New OpenFileDialog()
openFileDialog.InitialDirectory = ""
openFileDialog.Filter = "PDF Files (*.pdf)|*.pdf"
If openFileDialog.ShowDialog() = Windows.Forms.DialogResult.OK Then
Dim pdf As Integer = oGdPictureImaging.PdfReaderLoadFromFile(openFileDialog.FileName)
For i As Integer = 1 To oGdPictureImaging.PdfReaderGetPageCount(pdf)
If oGdPictureImaging.PdfReaderSelectPage(pdf, i) Then
mImage = oGdPictureImaging.PdfReaderRenderPageToGdPictureImage(pdf, 300, False)
oGdPictureImaging.ConvertTo1Bpp(mImage)
oGdPictureImaging.AutoDeskew(mImage)
' Scan barcode
oGdPictureImaging.Barcode1DReaderDoScan(mImage)
' If no barcode is found exit, else continue process
Dim bcCount As Integer = oGdPictureImaging.Barcode1DReaderGetBarcodeCount
Dim bcIndex As Integer = 1
If bcCount = 0 Then
MsgBox("No barcode found!")
Exit Sub
ElseIf bcCount > 1 Then
For j As Integer = 1 To bcCount
If oGdPictureImaging.Barcode1DReaderGetBarcodeValue(i).Length >= 15 Then
bcIndex = i
End If
Next
tsName = oGdPictureImaging.Barcode1DReaderGetBarcodeValue(bcIndex)
Else
tsName = oGdPictureImaging.Barcode1DReaderGetBarcodeValue(1)
End If
GdViewer1.DisplayFromGdPictureImage(mImage)
ShowImageInfo()
mImage = Nothing
End If
Next
End If
End Sub

Costinel
Posts: 36
Joined: Mon Jul 11, 2016 9:35 am

Re: Barcode1DReaderDoScan does not find all barcodes

Post by Costinel » Thu Jan 24, 2019 9:43 am

Hello,

The archive seems to be corrupted. If the issue persists with the latest release, please open a support ticket.

Best regards,
Costinel

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest