Constructor PageElement
PageElement(IEnumerable<TextElement>, double, double, int, double, UnitMode)
Initializes a new instance of the PageElement class with structured text elements, page dimensions, rotation, and skew information. Each TextElement may represent a single character, a word, a line, or an entire paragraph; for best layout results you should supply word-level elements.
[JsonConstructor]
public PageElement(IEnumerable<TextElement> textElements, double width, double height, int rotation = 0, double skew = 0, UnitMode unit = UnitMode.Points)
Parameters
textElementsIEnumerable<TextElement>The layout-aware text elements to associate with the page. Each element’s Text can be:
- a single character
- a word (recommended)
- a line of text
- a paragraph
widthdoubleThe width of the page in points.
heightdoubleThe height of the page in points.
rotationintThe detected rotation of the page in degrees clockwise (e.g., 0, 90, 180, or 270).
skewdoubleThe detected skew angle of the page in degrees clockwise.
unitUnitModeCoordinate unit for page and elements. Default: Points.
PageElement(string)
Initializes a new instance of the PageElement class with plain unstructured text only. This constructor should be used when no layout or bounding box information is available.
public PageElement(string text)
Parameters
textstringThe unstructured textual content of the page.