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.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: pdftron.PDF
Assembly: PDFTronDotNet.dll
Syntax
public class Style : IDisposable

Constructors

| Improve this Doc View Source

Style()

Declaration
public Style()

Methods

| Improve this Doc View Source

Dispose()

Declaration
public void Dispose()
| Improve this Doc View Source

Dispose(Boolean)

Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type Name Description
System.Boolean disposing
| Improve this Doc View Source

Equals(Object)

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

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

another object

Returns
Type Description
System.Boolean

true if equals specified object

Overrides
System.Object.Equals(System.Object)
| Improve this Doc View Source

Finalize()

Releases all resources used by the Style

Declaration
protected void Finalize()
| Improve this Doc View Source

GetColor()

Gets the color.

Declaration
public int[] GetColor()
Returns
Type Description
System.Int32[]

text color in RGB color space.

| Improve this Doc View Source

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());

| Improve this Doc View Source

GetFontName()

Gets the font name.

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

the font name used to draw the selected text.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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

| Improve this Doc View Source

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

| Improve this Doc View Source

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

| Improve this Doc View Source

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

| Improve this Doc View Source

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

| Improve this Doc View Source

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
  • Improve this Doc
  • View Source
Back to top Generated by DocFX