new TextExtractorStyle()
A class representing predominant text style associated with a given Line, a Word, or a Glyph. The class includes information about the font, font size, font styles, text color, etc.
Methods
-
<static> create()
-
Constructor
Returns:
A promise that resolves to an object of type: "textextractorstyle"
-
copy()
-
Copy Constructor
Returns:
A promise that resolves to an object of type: "textextractorstyle"
-
getColor()
-
Returns:
text color in RGB color space.
-
getFont()
-
Returns:
A promise that resolves to low-level PDF font object. A high level font object can be instantiated as follows: In C++: pdftron.PDF.Font f(style.GetFont()) In C#: pdftron.PDF.Font f = new pdftron.PDF.Font(style.GetFont());
- Type
- PDFNet.Obj
-
getFontName()
-
Returns:
A promise that resolves to the font name used to draw the selected text.
- Type
- string
-
getFontSize()
-
Returns:
A promise that resolves to the font size used to draw the selected text as it appears on the output page.
- Type
- number
-
getWeight()
-
Returns:
A promise that resolves to the weight (thickness) component of the fully-qualified font name or font specifier. The possible values are 100, 200, 300, 400, 500, 600, 700, 800, or 900, where each number indicates a weight that is at least as dark as its predecessor. A value of 400 indicates a normal weight; 700 indicates bold. Note: The specific interpretation of these values varies from font to font. For example, 300 in one font may appear most similar to 500 in another.
- Type
- number
-
isItalic()
-
Returns:
A promise that resolves to true if glyphs have dominant vertical strokes that are slanted.
- Type
- boolean
-
isSerif()
-
Returns:
A promise that resolves to true if glyphs have serifs, which are short strokes drawn at an angle on the top and bottom of glyph stems.
- Type
- boolean