Show / Hide Table of Contents

Class 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.

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

Constructors

Style()

Declaration
public Style()

Methods

Dispose()

Releases all resources used by the Style

Declaration
public override sealed void Dispose()

Dispose(Boolean)

Declaration
[HandleProcessCorruptedStateExceptions]
protected virtual void Dispose(bool A_0)
Parameters
Type Name Description
System.Boolean A_0

Equals(Object)

Checks whether this Style object is the same as the opject specified.

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

another object

Returns
Type Description
System.Boolean

true if equals specified object

Finalize()

Declaration
protected void Finalize()

GetColor()

Gets the color.

Declaration
public Color GetColor()
Returns
Type Description
System.Drawing.Color

text color in RGB color space.

GetFont()

Gets the font.

Declaration
public Obj GetFont()
Returns
Type Description
Obj

low-level PDF font object. A high level font object can be instantiated as follows: pdftron.PDF.Font f = new pdftron.PDF.Font(style.getFont());

GetFontName()

Gets the font name.

Declaration
public string GetFontName()
Returns
Type Description
System.String

the font name used to draw the selected text.

GetFontSize()

Gets the font size.

Declaration
public double GetFontSize()
Returns
Type Description
System.Double

The font size used to draw the selected text as it appears on the output page.

Remarks

Unlike the 'font size' in the graphics state (pdftron.PDF.GState) the returned font size accounts for the effects CTM, text matrix, and other graphics state attributes that can affect the appearance of text.

GetWeight()

Gets the weight.

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

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.

IsItalic()

Checks if is italic.

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

true if glyphs have dominant vertical strokes that are slanted.

Remarks

the return value corresponds to the state of 'italic' flag in the 'Font Descriptor'.

IsSerif()

Checks if is serif.

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

true if glyphs have serifs, which are short strokes drawn at an angle on the top and bottom of glyph stems.

Remarks

the return value corresponds to the state of 'serif' flag in the 'Font Descriptor'.

op_Assign(TextExtractor.Style)

Assignment operator

Declaration
public TextExtractor.Style op_Assign(TextExtractor.Style r)
Parameters
Type Name Description
TextExtractor.Style r

specified Style object

Returns
Type Description
TextExtractor.Style

a Style object equals to the specified object

Set(TextExtractor.Style)

Sets value to the specified Style

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

specified Style object

Operators

Equality(TextExtractor.Style, TextExtractor.Style)

Equality operator check whether two Style objects are the same.

Declaration
public static bool operator ==(TextExtractor.Style l, TextExtractor.Style r)
Parameters
Type Name Description
TextExtractor.Style l

object at the left of the operator

TextExtractor.Style r

object at the right of the operator

Returns
Type Description
System.Boolean

true if both objects are equal, false otherwise

Inequality(TextExtractor.Style, TextExtractor.Style)

Inequality operator check whether two Style objects are different.

Declaration
public static bool operator !=(TextExtractor.Style l, TextExtractor.Style r)
Parameters
Type Name Description
TextExtractor.Style l

object at the left of the operator

TextExtractor.Style r

object at the right of the operator

Returns
Type Description
System.Boolean

true if both objects are not equal, false otherwise

Implements

System.IDisposable
Back to top Generated by DocFX