Class PdfWord
- Namespace
- DocToolkit
- Assembly
- DocToolkit.Pdf.dll
One word of a PDF's text layer, and where it sits on the page.
public sealed class PdfWord
- Inheritance
-
PdfWord
- Inherited Members
Remarks
ExtractText(byte[]) answers what a page says; this answers where it says it. Locating a total on an invoice, checking a stamp landed inside the margin, or routing a scanned form by region all need the position and cannot be built on the string alone.
A page with no text layer produces no words. A scanned document is images, so it yields an empty list per page rather than a failure — the same rule ExtractText(byte[]) already documents, and OCR remains out of scope.
What counts as a word is PdfPig's segmentation of the page's text-showing operators, not a dictionary. Punctuation usually rides along with the token it touches.
Properties
Bounds
Where the word sits on its page, in PDF user-space points.
public PdfBounds Bounds { get; }
Property Value
Text
The word's text, exactly as the page's text layer holds it.
public string Text { get; }
Property Value
Methods
ToString()
The word and its lower-left corner, for logs and test failure messages.
public override string ToString()