new TextExtractorLine()
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.
Methods
-
<static> create()
-
Constructor
Returns:
A promise that resolves to an object of type: "textextractorline"
- Type
- textextractorline
-
endsWithHyphen()
-
Returns:
A promise that resolves to true is this line of text ends with a hyphen (i.e. '-'), false otherwise.
- Type
- boolean
-
getCurrentNum()
-
Returns:
A promise that resolves to the index of this line of the current page.
- Type
- number
-
getFirstWord()
-
Returns:
A promise that resolves to the first word in the line.
- Type
- textextractorword
-
getFlowID()
-
Returns:
A promise that resolves to 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.
- Type
- number
-
getNextLine()
-
Returns:
A promise that resolves to the next line on the page.
- Type
- textextractorline
-
getNumWords()
-
Returns:
A promise that resolves to the number of words in this line.
- Type
- number
-
getParagraphID()
-
Returns:
A promise that resolves to 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.
- Type
- number
-
getQuad()
-
Gets the quadrilateral bounding box for the word (in unrotated page coordinates)
-
getStyle()
-
Returns:
A promise that resolves to predominant style for this line.
- Type
- textextractorstyle
-
getWord(word_idx)
-
Parameters:
Name Type Description word_idx
number A integer representing the index of the word to get.
Returns:
A promise that resolves to the i-th word in this line.
- Type
- textextractorword
-
isSimpleLine()
-
Returns:
A promise that resolves to true is this line is not rotated (i.e. if the quadrilaterals returned by GetBBox() and GetQuad() coincide).
- Type
- boolean
-
isValid()
-
Returns:
A promise that resolves to true if this is a valid line, false otherwise.
- Type
- boolean