This class describes how recognized text is positioned on the image providing bbox for each text item (could be a line or a word). More...
This class describes how recognized text is positioned on the image providing bbox for each text item (could be a line or a word).
| virtual Point [] iText.Pdfocr.TextInfo.GetPixelTextPoints |
( |
int |
imageHeight |
) |
|
|
inlinevirtual |
Gets array of 4 iText.Kernel.Geom.Point s describing text bbox (lower-left based relative to text) expressed in pixels.
Gets array of 4 iText.Kernel.Geom.Point s describing text bbox (lower-left based relative to text) expressed in pixels.
Point array stores text polygon in the following order relative to text: 0 - lower-left, 1 - upper-left, 2 - upper-right, 3 - lower-right point.
The following coordinate system is used for text points coordinate: the origin is located in left top corner of the page (image), vertical (y) coordinates increase from the top of the page to the bottom, horizontal (x) coordinates increase from the left side of the page to the right, axe unit is pixel (1 pixel = 1/96 inch = 0.75 PDF point).
-
Parameters
-
| imageHeight |
height of the image to convert the text PDF points to image pixels coordinates. Used to change the y origin |
-
Returns
-
array of 4 iText.Kernel.Geom.Point s describing text bbox (lower-left based relative to text) expressed in pixels
| virtual Point [] iText.Pdfocr.TextInfo.GetTextPoints |
( |
|
) |
|
|
inlinevirtual |
Gets array of 4 iText.Kernel.Geom.Point s describing text bbox (lower-left based relative to text) expressed in points.
Gets array of 4 iText.Kernel.Geom.Point s describing text bbox (lower-left based relative to text) expressed in points.
Point array stores text polygon in the following order relative to text: 0 - lower-left, 1 - upper-left, 2 - upper-right, 3 - lower-right point.
The following coordinate system is used for points coordinate: the origin is located in left bottom corner of the page, vertical (y) coordinates increase from the bottom of the page to the top, horizontal (x) coordinates increase from the left side of the page to the right, axe unit is user space unit which we call PDF point (1 PDF point = 1/72 inch = 4/3 pixel).
-
Returns
-
array of 4 iText.Kernel.Geom.Point s describing text bbox (lower-left based relative to text) expressed in points
Sets logical structure tree parent item for the text info.
Sets logical structure tree parent item for the text info. It allows to organize text chunks into logical hierarchy, e.g. specify document paragraphs, tables, etc.
If LogicalStructureTreeItem is set, then the list of TextInfo s in IOcrEngine.DoImageOcr(System.IO.FileInfo) return value is expected to be in logical order.
-
Parameters
-
| logicalStructureTreeItem |
structure tree item |
| virtual iText.Pdfocr.TextInfo iText.Pdfocr.TextInfo.SetPixelTextPoints |
( |
Point[] |
textPoints, |
|
|
int |
imageHeight |
|
) |
|
|
|
inlinevirtual |
Sets an array of 4 iText.Kernel.Geom.Point s describing text bbox (lower-left based relative to text) expressed in pixels.
Sets an array of 4 iText.Kernel.Geom.Point s describing text bbox (lower-left based relative to text) expressed in pixels.
Point array should store text polygon in the following order relative to text: 0 - lower-left, 1 - upper-left, 2 - upper-right, 3 - lower-right point.
The following coordinate system is used for text points coordinate: the origin is located in left top corner of the page, vertical (y) coordinates increase from the top of the page to the bottom, horizontal (x) coordinates increase from the left side of the page to the right, axe unit is pixel (1 pixel = 1/96 inch = 0.75 PDF point).
-
Parameters
-
| textPoints |
array of 4 iText.Kernel.Geom.Point s describing text bbox (0 - lower-left, 1 - upper-left, 2 - upper-right, 3 - lower-right relative to text) expressed in pixels |
| imageHeight |
height of the image to convert the text PDF points to image pixels coordinates. Used to change the y origin |
-
Returns
-
array of 4 iText.Kernel.Geom.Point s describing text bbox (lower-left based relative to text) expressed in pixels
Sets array of 4 iText.Kernel.Geom.Point s describing text bbox (lower-left based relative to text) expressed in points.
Sets array of 4 iText.Kernel.Geom.Point s describing text bbox (lower-left based relative to text) expressed in points.
Point array should store text polygon in the following order relative to text: 0 - lower-left, 1 - upper-left, 2 - upper-right, 3 - lower-right point.
The following coordinate system is used for points coordinate: the origin is located in left bottom corner of the page, vertical (y) coordinates increase from the bottom of the page to the top, horizontal (x) coordinates increase from the left side of the page to the right, axe unit is user space unit which we call PDF point (1 PDF point = 1/72 inch = 4/3 pixel).
-
Parameters
-
| textPoints |
array of 4 iText.Kernel.Geom.Point s describing text bbox (lower-left based relative to text) expressed in points |
-
Returns
-
this instance