java.lang.Object | |
↳ | com.pdftron.pdf.TextExtractor.Style |
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.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
void |
close()
Frees the native memory of the object.
| ||||||||||
void |
destroy()
Frees the native memory of the object.
| ||||||||||
boolean | equals(Object other) | ||||||||||
Color |
getColor()
Get the color.
| ||||||||||
Obj |
getFont()
Get the font as Cos/SDF object
| ||||||||||
String |
getFontName()
Get the font name.
| ||||||||||
double |
getFontSize()
Get the font size.
| ||||||||||
int |
getWeight()
Get the weight.
| ||||||||||
boolean |
isItalic()
Checks if font is italic.
| ||||||||||
boolean |
isSerif()
Checks if font is serif.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
java.lang.AutoCloseable
|
Frees the native memory of the object. This can be explicity called to control the deallocation of native memory and avoid situations where the garbage collector does not free the object in a timely manner.
Frees the native memory of the object. This can be explicity called to control the deallocation of native memory and avoid situations where the garbage collector does not free the object in a timely manner.
Get the color.
Get the font as Cos/SDF object
com.pdftron.pdf.Font f = new com.pdftron.pdf.Font(style.getFont());
Get the font name.
Get the font size.
Note: Unlike the 'font size' in the graphics state (GState
)
the returned font size accounts for the effects CTM, text matrix,
and other graphics state attributes that can affect the appearance of
text.
Get the weight.
Checks if font is italic.
Note: the return value corresponds to the state of 'italic' flag in the 'Font Descriptor'.
Checks if font is serif.
Note: the return value corresponds to the state of 'serif' flag in the 'Font Descriptor'.