Shearch text on multiples pages

Example requests & Code samples for GdPicture Toolkits.
Post Reply
anvasi
Posts: 33
Joined: Fri Dec 12, 2008 1:16 pm

Shearch text on multiples pages

Post by anvasi » Thu Mar 05, 2009 12:13 pm

Hi,

It's posible any example for search text in multiple pages in pdf such as acrobat reader?


Thanks a lot,

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: Shearch text on multiples pages

Post by Loïc » Fri Mar 06, 2009 4:13 pm

Hi,

The overloaded PdfSearchText methods can help you.
I give you a short sample to find all the occurrences of a word on a specific page:

Code: Select all

Dim PageNo As Integer = 2 'For searching page 2
Dim Occurence As Integer = 1 ' occurence to search for
Dim Left, Top, Width, Height As Single 'coordinates of the text searched
Dim OccurencesCount as Integer = 0

Do While GdViewer1.PdfSearchText(PageNo, "mytest", Occurence, False, Left, Top, Width, Height)
   OccurencesCount  =+ 1;     
   'Do something...
Loop
Best regards,

Loïc

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests