TextSearchInfo Class
Contains information about text search results in a PDF document.
Namespace: DevExpress.Docs.Pdf
Assembly: DevExpress.Docs.Pdf.v26.1.dll
Declaration
Example
How to: Find Text in a PDF Document
The following code snippet searches for the word “DevExpress” on the first three pages of a PDF document:
using DevExpress.Docs.Pdf;
using System.Collections.Generic;
using System.IO;
using (FileStream fileStream =
File.OpenRead(@"Document.pdf"))
{
using (PdfDocument pdfDocument = new PdfDocument(fileStream))
{
// Search for text in the first three pages.
IEnumerable<TextSearchInfo> results =
pdfDocument.FindText("DevExpress",
new TextSearchOptions(true, true), 0, 2);
foreach (TextSearchInfo searchResult in results)
{
// Process search results.
}
pdfDocument.Save(
File.OpenWrite(
@"Document_upd.pdf"));
}
}
Inheritance
Object
TextSearchInfo
See Also