Page 1 of 1

1D barcode recognition plugin example

Posted: Thu Sep 17, 2009 5:10 pm
by rjskelton
Can you please provide an example or guidelines for using the 1D barcode recognition plug-in? I would like to read barcodes from a multi page/document loaded into the GdViewer.

Re: 1D barcode recognition plugin example

Posted: Fri Sep 18, 2009 11:56 am
by Loïc
Hi,

Here is a way to detect barcodes on the displayed image:

Code: Select all

Imaging1.SetNativeImage (GdViewer1.GetNativeImage)
Imaging1.SetLicenseNumber1DBarcodeRecognition ("XXX") 'Replace XXX by a commercial or a demo key
Imaging1.Barcode1DReaderDoScan
For i = 1 To Imaging1.Barcode1DReaderGetBarcodeCount
   MsgBox "Value: " + Imaging1.Barcode1DReaderGetBarcodeValue(i)
   MsgBox "Type: " + Str(Imaging1.Barcode1DReaderGetBarcodeType(i))
   MsgBox "Angle: " + Str(Imaging1.Barcode1DReaderGetBarcodeSkewAngle(i))
Next i
Imaging1.Barcode1DReaderClear

Note: Imaging1 is an Imaging object and GdViewer1 the GdViewer displaying the image.

Kind regards,

Loïc