Barcode1DReaderDoScan does not find all barcodes

Discussions about 1D barcode reading and writing
Post Reply
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.
This zip contains the PDF document
(54.47 KiB) Downloaded 143 times

Code: Select all

Private Sub OpenToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OpenToolStripMenuItem.Click
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)
' Scan barcode
' 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
tsName = oGdPictureImaging.Barcode1DReaderGetBarcodeValue(bcIndex)
tsName = oGdPictureImaging.Barcode1DReaderGetBarcodeValue(1)
End If
mImage = Nothing
End If
End If
End Sub

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest