Parameter
iPage Specifies the page number for scanning barcode. The first page is 1.
iImageIndex Specifies the index of image for scanning barcode. The first index of image is 1. Use BarCodeReadPDFImageCount method can get the total count of image for specifc page.
Return Value
Return the number of barcode detected, if return value smaller than 0, it mean failed.
Example
Visual Basic Syntax
iPageCount =Scanner1.BarCodeReadPDFOpen(strPDFFile) For i = 1 To iPageCount cbopdfpage.AddItem ("Page " + Trim(Str(i))) Next
If cbopdfpage.ListCount > 0 Then cbopdfpage.ListIndex = 0 End If
iImageCountPerPage=Scanner1.BarCodeReadPDFImageCount(cbopdfpage.ListIndex+1) For i = 1 To iImageCountPerPage cbopdfimageperpage.AddItem ("Image " + Trim(Str(i))) Next
If cbopdfimageperpage.ListCount > 0 Then cbopdfimageperpage.ListIndex = 0 End If Scanner1.BarCodeReadScanMultiple = False Scanner1.BarCodeReadScanWithoutRotation = True Scanner1.BarCodeReadScan45Rotation =True Scanner1.BarCodeReadScan45CouterRotation =True Scanner1.BarCodeReadScanAccuracy = True Scanner1.BarCodeReadCustomRotation=0
ibarcodeCount = Scanner1.BarCodeReadPDFScan(cbopdfpage.ListIndex + 1, cbopdfimageperpage.ListIndex + 1)
str1 = "Total " + Str(ibarcodeCount) + " BarCode detected" + Chr(13) + Chr(10)
For i = 0 To ibarcodeCount - 1 strTmp = Scanner1.BarCodeGetType(i) + " score:" + Str(Scanner1.BarCodeGetScore(i)) + " value:" + Scanner1.BarCodeGetValue(i) str1 = str1 + Chr(13) + Chr(10) + strTmp Next
MsgBox str1
|
|
|