Scanner ActiveX Control

BarCodeReadPDFOpen

 

If you use LoadImage() load the PDF, then call BarCodeReadFullPage() that cannot detected the barcode, you may try call BarCodeReadPDFOpen() load the PDF for advanced Barcode recognition.

Public Function BarCodeReadPDFOpen(
   ByVal strPDFFile As String )
 As Integer

 

Parameter

strPDFFile
Specifies the string of PDF File.


Return Value

If successful, return the total count of pdf. Otherwise return -1.

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