Class TextExtractor.Line
TextExtractor::Line object represents a line of text on a PDF page. Each line consists of a sequence of words, and each words in one or more styles.
Implements
Inherited Members
Namespace: pdftron.PDF
Assembly: PDFNet.dll
Syntax
public class TextExtractor.Line : IDisposable
Constructors
Line()
Declaration
public Line()
Methods
Dispose()
Releases all resources used by the Line
Declaration
public override sealed void Dispose()
Dispose(bool)
Declaration
[HandleProcessCorruptedStateExceptions]
protected virtual void Dispose(bool A_0)
Parameters
Type | Name | Description |
---|---|---|
bool | A_0 |
EndsWithHyphen()
Ends with hyphen.
Declaration
public bool EndsWithHyphen()
Returns
Type | Description |
---|---|
bool | true, if successful |
Equals(object)
Determines if equals to the specified object
Declaration
public bool Equals(object o)
Parameters
Type | Name | Description |
---|---|---|
object | o | specified object |
Returns
Type | Description |
---|---|
bool | true if both objects are equal. false, otherwise |
~Line()
Declaration
protected ~Line()
GetBBox()
Gets the b box.
Declaration
public Rect GetBBox()
Returns
Type | Description |
---|---|
Rect | The bounding box for this line (in unrotated page coordinates). |
Remarks
To account for the effect of page '/Rotate' attribute, transform all points using page.GetDefaultMatrix().
GetCurrentNum()
Gets the current num.
Declaration
public int GetCurrentNum()
Returns
Type | Description |
---|---|
int | the index of this line of the current page. |
GetFirstWord()
Gets the first word.
Declaration
public TextExtractor.Word GetFirstWord()
Returns
Type | Description |
---|---|
TextExtractor.Word | the first word in the line. |
Remarks
To traverse the list of all words on this line use word.GetNextWord().
GetFlowID()
Gets the flow id.
Declaration
public int GetFlowID()
Returns
Type | Description |
---|---|
int | The unique identifier for a paragraph or column that this line belongs to. This information can be used to identify which lines/paragraphs belong to which flows. |
GetNextLine()
Gets the next line.
Declaration
public TextExtractor.Line GetNextLine()
Returns
Type | Description |
---|---|
TextExtractor.Line | the next line on the page. |
GetNumWords()
Gets the num words.
Declaration
public int GetNumWords()
Returns
Type | Description |
---|---|
int | The number of words in this line. |
GetParagraphID()
Gets the paragraph id.
Declaration
public int GetParagraphID()
Returns
Type | Description |
---|---|
int | The unique identifier for a paragraph or column that this line belongs to. This information can be used to identify which lines belong to which paragraphs. |
GetQuad()
Gets the quad.
Declaration
public double[] GetQuad()
Returns
Type | Description |
---|---|
double[] | out_quad The quadrilateral representing a tight bounding box for this line (in unrotated page coordinates). |
GetStyle()
Gets the style.
Declaration
public TextExtractor.Style GetStyle()
Returns
Type | Description |
---|---|
TextExtractor.Style | predominant style for this line. |
GetWord(int)
Gets the first word.
Declaration
public TextExtractor.Word GetWord(int word_idx)
Parameters
Type | Name | Description |
---|---|---|
int | word_idx | index of the word |
Returns
Type | Description |
---|---|
TextExtractor.Word | word with specified index |
IsSimpleLine()
Checks if is simple line.
Declaration
public bool IsSimpleLine()
Returns
Type | Description |
---|---|
bool | true is this line is not rotated (i.e. if the quadrilaterals returned by GetBBox() and GetQuad() coincide). |
IsValid()
Checks if line is valid
Declaration
public bool IsValid()
Returns
Type | Description |
---|---|
bool | true if line is valid, false otherwise. |
Set(Line)
Sets value to the specified Line
object
Declaration
public void Set(TextExtractor.Line r)
Parameters
Type | Name | Description |
---|---|---|
TextExtractor.Line | r | another |
op_Assign(Line)
Assignment operator
Declaration
public TextExtractor.Line op_Assign(TextExtractor.Line l)
Parameters
Type | Name | Description |
---|---|---|
TextExtractor.Line | l | another |
Returns
Type | Description |
---|---|
TextExtractor.Line | a |
Operators
operator ==(Line, Line)
Equality operator checks whether two Line
objects are the same.
Declaration
public static bool operator ==(TextExtractor.Line l, TextExtractor.Line r)
Parameters
Type | Name | Description |
---|---|---|
TextExtractor.Line | l |
|
TextExtractor.Line | r |
|
Returns
Type | Description |
---|---|
bool | true if both objects are equal |
operator !=(Line, Line)
Inequality operator checks whether two Line
objects are different.
Declaration
public static bool operator !=(TextExtractor.Line l, TextExtractor.Line r)
Parameters
Type | Name | Description |
---|---|---|
TextExtractor.Line | l |
|
TextExtractor.Line | r |
|
Returns
Type | Description |
---|---|
bool | true if both objects are equal |