SearchText
Declaration
Delphi
function SearchText(SearchText, FontName: AnsiString; var res: TTextFinderResults): boolean;
ActiveX
HRESULT _stdcall SearchText([in] BSTR SearchText, [in] BSTR FontName, [out, retval] VARIANT * SearchResult );
Arguments
Argument | Description |
---|---|
SearchString | The text you want to search for. |
FontName | Not in use right now |
SearchResult | Array of SearchText structure |
Return value
This is an boolean value. True if Text is found in PDF Dokument.
Description
This function is used to search strings in a PDF document. Such a string can be useful as anchor to help setting the correct signature position, for example in a dynamic document, where the content is always different and so the position of the signature does not have fixed coordinates. The function also works well with "invisible" text (white text on white background) or very small text sizes.
Â
The array, which you get back from the function, contains the coordinates of all positions, at which the search string was found in the document. The values are the coordinates of the top left and bottom right corners as well as the pagenumbers.
C# sample
SearchText Structure
|
Â
Â
Â