PdfSearchMatch class final

A single text-search match returned by PdfDocument.search.

Each instance describes one occurrence of the search query on a specific page. Multi-line matches (where the matching text wraps across visual rows) produce a single PdfSearchMatch with multiple entries in rects — one per visual line fragment.

Coordinate system

All coordinates in rects are in PDF user space (origin bottom-left, units in points), consistent with PdfRect and page-size coordinates used throughout this library. Callers that need screen-space coordinates must apply FPDF_PageToDevice() / FPDF_DeviceToPage() themselves.

Constructors

PdfSearchMatch({required int pageIndex, required int charIndex, required int charCount, required List<PdfRect> rects})
Creates an immutable PdfSearchMatch.
const

Properties

charCount int
Number of matched characters.
final
charIndex int
Zero-based character index of the first matched character on this page.
final
hashCode int
The hash code for this object.
no setteroverride
pageIndex int
Zero-based index of the page on which this match was found.
final
rects List<PdfRect>
Bounding rectangles of this match in PDF user-space (origin bottom-left, units in points).
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
override