i have just requested trial form 1d and 2d barcode recognition
i tryied with some documents and a lot of them had both type of barcode
1d barcode recognition was always perfect
2d barcode recognition always fails
all document were in pdf format (how can i attach you one?)
here is my sample code:
Code: Select all
Dim i As Integer
Dim nBar As Long
Dim GdvPicture As Object
Dim gdImage As GdPicturePro5.cImaging
Set GdvPicture = CreateObject("gdpicturepro5.GdViewer")
With GdvPicture
.SetLicenseNumber (GDPICTURELICENSE)
Call .DisplayFromFile("C:\VB6Project\AssoBox\Parking\CDP_LIbretti\CdP500021.pdf")
End With
Set gdImage = New GdPicturePro5.cImaging
With gdImage
.SetLicenseNumber (GDPICTURELICENSE)
.SetLicenseNumberDataMatrixBarcodeRecognition (GD2DBARCODELICENSE)
.ConvertTo1Bpp
Call .BarcodeDataMatrixReaderDoScan(1)
nBar = .BarcodeDataMatrixReaderGetBarcodeCount
For i = 1 To nBar
MsgBox "Value: " + .BarcodeDataMatrixReaderGetBarcodeValue(i)
'MsgBox "Type: " + Str(.BarcodeDataMatrixReaderGetBarcodeType(i))
'MsgBox "Angle: " + Str(.BarcodeDataMatrixReaderGetBarcodeSkewAngle(i))
Next
Call .BarcodeDataMatrixReaderClear
Call .CloseNativeImage
End With