Scanner ActiveX Control

BarCodeReadPDFImageCount

 

Get the total count of image for specific page of PDF file.

Public Function BarCodeReadPDFImageCount(
   ByVal iPage As long )
 As Integer

 

Parameter

iPage
Specifies the page number for get the total count of image. The first page is 1.


Return Value

Return the total count of image.

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