Show / Hide Table of Contents

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.

Inheritance
System.Object
TextExtractor.Line
Implements
System.IDisposable
Inherited Members
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ToString()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: pdftron.PDF
Assembly: PDFNetAndroid.dll
Syntax
public class Line : IDisposable

Constructors

Line()

Declaration
public Line()

Methods

Dispose()

Declaration
public void Dispose()

Dispose(Boolean)

Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type Name Description
System.Boolean disposing

EndsWithHyphen()

Ends with hyphen.

Declaration
public bool EndsWithHyphen()
Returns
Type Description
System.Boolean

true, if successful

Equals(Object)

Determines if equals to the specified object

Declaration
public override bool Equals(object o)
Parameters
Type Name Description
System.Object o

specified object

Returns
Type Description
System.Boolean

true if both objects are equal. false, otherwise

Overrides
System.Object.Equals(System.Object)

Finalize()

Releases all resources used by the Line

Declaration
protected void Finalize()

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
System.Int32

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
System.Int32

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
System.Int32

The number of words in this line.

GetParagraphID()

Gets the paragraph id.

Declaration
public int GetParagraphID()
Returns
Type Description
System.Int32

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
System.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(Int32)

Gets the first word.

Declaration
public TextExtractor.Word GetWord(int word_idx)
Parameters
Type Name Description
System.Int32 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
System.Boolean

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
System.Boolean

true if line is valid, false otherwise.

op_Assign(TextExtractor.Line)

Assignment operator

Declaration
public TextExtractor.Line op_Assign(TextExtractor.Line l)
Parameters
Type Name Description
TextExtractor.Line l

another Line object

Returns
Type Description
TextExtractor.Line

a Line object

Set(TextExtractor.Line)

Sets value to the specified Line object

Declaration
public void Set(TextExtractor.Line r)
Parameters
Type Name Description
TextExtractor.Line r

another Line object

Operators

Equality(TextExtractor.Line, TextExtractor.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

Line object at the left of operator

TextExtractor.Line r

Line object at the right of the operator

Returns
Type Description
System.Boolean

true if both objects are equal

Inequality(TextExtractor.Line, TextExtractor.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

Line object at the left of operator

TextExtractor.Line r

Line object at the right of the operator

Returns
Type Description
System.Boolean

true if both objects are equal

Implements

System.IDisposable
In This Article
Back to top Generated by DocFX