Method GetSpans
- Namespace
- BitMiracle.Docotic.Pdf
- Assembly
- BitMiracle.Docotic.Pdf.dll
GetSpans()
Gets the text spans that make up the entire match.
public IEnumerable<PdfTextSpan> GetSpans()
Returns
- IEnumerable<PdfTextSpan>
A sequence of PdfTextSpan objects representing the matched text.
Remarks
A match can consist of multiple text fragments in the PDF document. Therefore, this method can return multiple spans.
The returned spans represent only text fragments present in the PDF content stream. Whitespace inferred from the positioning of text fragments is not represented by any span.
Text fragments are combined into a single span when both of the following conditions are met:
- The fragments are located close to each other.
- The fragments have the same state, including font, font size, character spacing, word spacing, horizontal scaling, text rendering mode, stroke and fill parameters, and layer.