PDFSearchText doesn't match multiple words

Discussions about document viewing.
Post Reply
pparker
Posts: 2
Joined: Tue Mar 20, 2012 5:38 pm

PDFSearchText doesn't match multiple words

Post by pparker » Tue Mar 20, 2012 5:51 pm

Hi,
I'm trying to use PdfSearchText to perform in document searching and have ran into an issue where if you search for multiple words they aren't found, even when they are found individually.

Calling PdfGetPageText() will return a string that contains the search term as expected (calling .Contains("search term") on this method will return true), but when using PdfSearchText to find the first occurrence of the search term on the page the result is always false.

Is it a case that PdfSearchText() can only be used to match single words rather than phrases?

Thanks

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

Re: PDFSearchText doesn't match multiple words

Post by Loïc » Tue Mar 20, 2012 6:33 pm

Hello,

This method supports multiple words research. Have you tried with different PDFs ?

If your problem still persists you can send us your file through https://www.gdpicture.com/support/getting-support-from-our-team and provide us the text you are searching for.

Kind regards,

Loïc

pparker
Posts: 2
Joined: Tue Mar 20, 2012 5:38 pm

Re: PDFSearchText doesn't match multiple words

Post by pparker » Tue Mar 20, 2012 6:49 pm

Hi,
Yeah I've tried with several different PDFs, and they all exhibit the same behaviour.
All of the PDFs were generated from TIFs by GD's PdfOCRCreateFromMultipageTIFF and SaveAsPDFOCR methods if that's at all relevant.

I've submitted an example file along with the search terms that are failing.

Thanks.

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

Re: PDFSearchText doesn't match multiple words

Post by Loïc » Tue Mar 20, 2012 7:41 pm

Thanks, problem fixed for the next minor release.

Kind regards,

Loïc

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest