Class CellInfo
Information of each cell including cell border rectangle and text inside.
Inheritance
System.Object
CellInfo
Assembly: IronOcr.dll
Syntax
public sealed class CellInfo : ValueType
Reading a single cell of a scanned table runs through CellInfo, the record IronOCR produces for each cell it recognizes. You collect these from the CellInfos list on a TableInfo, one per cell, after an advanced table scan.
CellRect holds the cell's border rectangle on the page, and CellText holds the text recognized inside it, which together let you rebuild rows and columns from cell positions. Because CellInfo is a value type with a Deconstruct method, you can pull both fields out in one line, var (rect, text) = cell;, and compare cells with Equals. Use it when table layout matters and a flat string of recognized text is not enough; the rectangles tell you where each value sits relative to the others.
The read table in a document how-to demonstrates working with these cells, and the read table example puts the rectangles and text together.
Constructors
CellInfo(Rectangle, String)
Information of each cell including cell border rectangle and text inside.
Declaration
public CellInfo(Rectangle CellRect, string CellText)
Parameters
| Type |
Name |
Description |
| IronSoftware.Drawing.Rectangle |
CellRect |
Cell border rectangle
|
| System.String |
CellText |
Text inside the cell
|
Properties
CellRect
Declaration
public Rectangle CellRect { get; set; }
Property Value
| Type |
Description |
| IronSoftware.Drawing.Rectangle |
|
CellText
Declaration
public string CellText { get; set; }
Property Value
| Type |
Description |
| System.String |
|
Methods
Deconstruct(out Rectangle, out String)
Declaration
public void Deconstruct(out Rectangle CellRect, out string CellText)
Parameters
| Type |
Name |
Description |
| IronSoftware.Drawing.Rectangle |
CellRect |
|
| System.String |
CellText |
|
Equals(CellInfo)
Declaration
public bool Equals(CellInfo other)
Parameters
Returns
| Type |
Description |
| System.Boolean |
|
Equals(Object)
Declaration
public override bool Equals(object obj)
Parameters
| Type |
Name |
Description |
| System.Object |
obj |
|
Returns
| Type |
Description |
| System.Boolean |
|
GetHashCode()
Declaration
public override int GetHashCode()
Returns
| Type |
Description |
| System.Int32 |
|
ToString()
Declaration
public override string ToString()
Returns
| Type |
Description |
| System.String |
|
Operators
Equality(CellInfo, CellInfo)
Declaration
public static bool operator ==(CellInfo left, CellInfo right)
Parameters
Returns
| Type |
Description |
| System.Boolean |
|
Inequality(CellInfo, CellInfo)
Declaration
public static bool operator !=(CellInfo left, CellInfo right)
Parameters
Returns
| Type |
Description |
| System.Boolean |
|
Implements
System.IEquatable<>