Home | Translator | About us | Overview | Software - Download | Evaluate | Order | Support | Contact | F.A.Q. | Documentations | Blog | Newsletter | Site Content Search
Loading...

Detecting & Reading barcodes from PDF

Example requests & Code samples for GdPicture ActiveX.

Detecting & Reading barcodes from PDF

Postby Loïc » Sat Oct 17, 2009 6:28 pm

Hi,

Here a sample to detect & read all barcode of a PDF using GdPicture Pro Imaging SDK.

Note: This sample work with PDF and all king of image supported by the toolkit.


Code: Select all
Dim oImaging As Object, oGdViewer As Object
Dim i As Integer
Set oImaging = CreateObject("gdpicturepro5.Imaging")
Set oGdViewer = CreateObject("gdpicturepro5.GdViewer")


oGdViewer.SetLicenseNumber ("XXXX") 'Please, replace XXXX by a valid demo or commercial license key.
oImaging.SetLicenseNumber ("XXXX") 'Please, replace XXXX by a valid demo or commercial license key.
oImaging.SetLicenseNumber1DBarcodeRecognition ("XXXX") 'Please, replace XXXX by a valid demo or commercial license key.

oGdViewer.DisplayFromPdfFile ("c:\test.pdf")
oImaging.SetNativeImage (oGdViewer.GetNativeImage)
oImaging.ConvertTo1Bpp 'Should provide best accuracy in 1bpp mode.
oImaging.Barcode1DReaderDoScan (BestQuality)
For i = 1 To oImaging.Barcode1DReaderGetBarcodeCount
    MsgBox "Value: " + oImaging.Barcode1DReaderGetBarcodeValue(i)
    MsgBox "Type: " + Str(oImaging.Barcode1DReaderGetBarcodeType(i))
    MsgBox "Angle: " + Str(oImaging.Barcode1DReaderGetBarcodeSkewAngle(i))
Next i
oImaging.Barcode1DReaderClear
oGdViewer.CloseImage
User avatar
Loïc
Site Admin
 
Posts: 3425
Joined: Tue Oct 17, 2006 11:48 pm
Location: France

Re: Detecting & Reading barcodes from PDF

Postby ditte » Wed Feb 17, 2010 3:32 pm

Hi Loïc,

I´ve tested this sample with a demo pdf file "test.pdf".
There are 9 Barcodes included.
I think that the solution is good. I will send it by mail.
Regards

Dittmar
ditte
 
Posts: 46
Joined: Tue Jul 17, 2007 10:49 am
Location: Berlin, Germany


Return to Example requests & Code samples

Who is online

Users browsing this forum: No registered users and 1 guest