| || |
counting a string in pdf file using QTP
I am trying to count the number of times a string exists in a pdf file. I used the below code, but it is going in infinite loop. The problem is after finding the string after the last page,it comes back to 1st page and repeats all the steps again. Does anyone have a solve for this problem. ANy help will be appreciated.
Dim AcroApp, AcroAVDoc
Dim gPDFPath, bReset, nCount
gPDFPath = "xyz.pdf"
Set AcroApp = CreateObject( "AcroExch.App" )
Set AcroAVDoc = CreateObject( "AcroExch.AVDoc" )
If AcroAVDoc.Open( gPDFPath, "" ) Then
bReset = True : nCount = 0
Do While AcroAVDoc.FindText( "let", True, True, bReset )
bReset = False : nCount = nCount + 1
Wait 0, 200
Print "The word 'Checkpoint'
Re: counting a string in pdf file using QTP
User Condinate top,right,left,bottom and pass indexpage
Get text from specific page,text and use counter
let me know if i need that function
i always use cordinates ,get text from page and count them