Hello,
im using the function Document.SearchText Function to search for words in searchable pdf-files.
Looks like this:
Amyuni3_1.Open('C:\Temp\Test.pdf);
IF Amyuni3_1.SearchText(-1,'2521739',page,xpos,ypos) THEN
MESSAGE('found!');
Works with some documents, with others it does not.
Thats already written in the manual, so its prolly a wrong text type.
Now i wanted to try the SearchTextEx function:
Amyuni3_1.Open('C:\Temp\Test.pdf);
IF Amyuni3_1.SearchTextEx(-1,'2521739',page,xpos,ypos) THEN
MESSAGE('found!');
When executing this code, it says it was not able to handle one of the arguements?
According to manual, the handles should be the same as SearchText?!
-1 = Integer = StartPage
2521739 = TextString to search for
page = Integer for page number
x/ypos = Decimal for the coordinates
What do i have to change with SeachTextEx
Document.SearchText and SearchTextEx
Re: Document.SearchText and SearchTextEx
Hello
The parameters for the SearchText and SearchTextEx are the same. The only difference in the two methods is that SearchText only works with WinAnsi encoded streams, but not with other encodings. The SearchTextEx is also more accurrate than the SearchText.
In your code we would recommend explicitly defining your search string e.g.
Dim strFind As String
strFind = "2521739"
Amyuni3_1.Open('C:\Temp\Test.pdf);
IF Amyuni3_1.SearchText(-1,strFind,page,xpos,ypos) THEN
MESSAGE('found!');
Hope that helps?
David
The parameters for the SearchText and SearchTextEx are the same. The only difference in the two methods is that SearchText only works with WinAnsi encoded streams, but not with other encodings. The SearchTextEx is also more accurrate than the SearchText.
In your code we would recommend explicitly defining your search string e.g.
Dim strFind As String
strFind = "2521739"
Amyuni3_1.Open('C:\Temp\Test.pdf);
IF Amyuni3_1.SearchText(-1,strFind,page,xpos,ypos) THEN
MESSAGE('found!');
Hope that helps?
David
Amyuni Custom Development
Do you need a specific PDF solution? Are you looking for expertise that will enable you to start or complete a PDF integration project?
http://www.amyuni.com/en/company/services.php
Do you need a specific PDF solution? Are you looking for expertise that will enable you to start or complete a PDF integration project?
http://www.amyuni.com/en/company/services.php