# `PdfElixide.Document.SearchMatch`
[🔗](https://github.com/r8/pdf_elixide/blob/v0.16.0/lib/pdf_elixide/document/search_match.ex#L1)

One occurrence of a pattern found by `PdfElixide.Document.search/2`, with its
zero-based page index, the matched text, and where it sits on the page.

Both `:bbox` and every entry of `:span_boxes` are **whole-span** boxes rather
than the extents of the matched text itself: a match inside a longer run of
text reports the box of that whole run. Draw from `:span_boxes`, which has one
entry per run the match touched.

The [Search](guides/search.md) guide has the rest, including how far `:bbox`
over-covers, why a match can cross what looks like a line break, and when the
boxes come back empty.

# `t`

```elixir
@type t() :: %PdfElixide.Document.SearchMatch{
  bbox: PdfElixide.Geometry.Rect.t(),
  page: non_neg_integer(),
  span_boxes: [PdfElixide.Geometry.Rect.t()],
  text: String.t()
}
```

---

*Consult [api-reference.md](api-reference.md) for complete listing*
