Back to Devexpress

PdfTextSearchResults.Rectangles Property

officefileapi-devexpress-dot-pdf-dot-pdftextsearchresults.md

latest2.7 KB
Original Source

PdfTextSearchResults.Rectangles Property

Provides access to the document area containing the text found.

Namespace : DevExpress.Pdf

Assembly : DevExpress.Pdf.v25.2.Core.dll

NuGet Package : DevExpress.Pdf.Core

Declaration

csharp
public IList<PdfOrientedRectangle> Rectangles { get; }
vb
Public ReadOnly Property Rectangles As IList(Of PdfOrientedRectangle)

Property Value

TypeDescription
IList<PdfOrientedRectangle>

A collection of PdfOrientedRectangle objects.

|

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the Rectangles property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

pdf-document-api-highlight-search-results/CS/HighlightSearchResults/Program.cs#L68

csharp
PdfTextMarkupAnnotationFacade annotation =
          page.AddTextMarkupAnnotation(result.Rectangles[i], PdfTextMarkupAnnotationType.Highlight);
if (annotation != null)

pdf-document-api-highlight-search-results/VB/HighlightSearchResults/Program.vb#L57

vb
For i As Integer = 0 To result.Rectangles.Count - 1
    Dim annotation As PdfTextMarkupAnnotationFacade = page.AddTextMarkupAnnotation(result.Rectangles(i), PdfTextMarkupAnnotationType.Highlight)
    If annotation IsNot Nothing Then

See Also

PdfTextSearchResults Class

PdfTextSearchResults Members

DevExpress.Pdf Namespace