Image Viewer CP ActiveX Control

BarCodeReadPDFImageCount

 

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

Public Function BarCodeReadImageCount(
   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 =ImageViewer1.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=ImageViewer1.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
ImageViewer1.BarCodeReadScanMultiple = False
ImageViewer1.BarCodeReadScanWithoutRotation = True
ImageViewer1.BarCodeReadScan45Rotation =True
ImageViewer1.BarCodeReadScan45CouterRotation =True
ImageViewer1.BarCodeReadScanAccuracy = True
ImageViewer1.BarCodeReadCustomRotation=0

ibarcodeCount = Me.ImageViewer1.BarCodeReadPDFScan(cbopdfpage.ListIndex + 1, cbopdfimageperpage.ListIndex + 1)

str1 = "Total " + Str(ibarcodeCount) + " BarCode detected" + Chr(13) + Chr(10)

For i = 0 To ibarcodeCount - 1
strTmp = Me.ImageViewer1.BarCodeGetType(i) + " score:" + Str(Me.ImageViewer1.BarCodeGetScore(i)) + " value:" + Me.ImageViewer1.BarCodeGetValue(i)
str1 = str1 + Chr(13) + Chr(10) + strTmp
Next

MsgBox str1