Show / Hide Table of Contents

# Class CharData

CharData is a data structure returned by CharIterator that is used to provide extra information about a character within a text run. The extra information includes positioning information, the character data and a number of bytes taken by the character.

##### Inheritance

object
CharData

##### Implements

IDisposable

##### Inherited Members

object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()

###### Namespace: pdftron.PDF

###### Assembly: PDFTronDotNet.dll

##### Syntax

    public class CharData : IDisposable

### Properties

#### bytes

the number of bytes representing this character in char_data buffer. For simple fonts 'bytes' will equal 1. For multibyte (CID or Type0) fonts 'bytes may be larger than 1.

##### Declaration

    public int bytes { get; set; }

##### Property Value

Type | Description
--- | ---
int | the number of bytes representing this character in char_data buffer. 1 for symple fonts.

#### char_code

Gets the char code.

##### Declaration

    public int char_code { get; set; }

##### Property Value

Type | Description
--- | ---
int | Char code' For SimpleFonts char_code := char_data[0] for composite fonts char_code is the numeric value of data stored in char_data buffer.

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

#### char_data

Gets the char data.

##### Declaration

    public byte[] char_data { get; }

##### Property Value

Type | Description
--- | ---
byte[] | A buffer containing character data. For simple fonts each character is represented by a single byte. For multibyte (CID or Type0) fonts each character may take more than one byte.

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

#### x

To render text, a virtual point (x, y), located on the baseline, called the pen position, is used to locate glyphs.

The pen position has already taken into account the effects of any inter-character adjustments due to properties such as font size, text rise, character spacing, word spacing and positioning adjustments on 'TJ' elements.

##### Declaration

    public double x { get; set; }

##### Property Value

Type | Description
--- | ---
double | glyph horizontal position

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

#### y

Gets the glyph y.

##### Declaration

    public double y { get; set; }

##### Property Value

Type | Description
--- | ---
double | glyph vertical position

##### Exceptions

Type | Condition
--- | ---
PDFNetException | PDFNetException the PDFNet exception

### Methods

#### Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

##### Declaration

    public void Dispose()

#### Dispose(bool)

##### Declaration

    protected virtual void Dispose(bool disposing)

##### Parameters

Type | Name | Description
--- | --- | ---
bool | disposing |

#### ~CharData()

Releases all resources used by the CharData

##### Declaration

    protected ~CharData()

### Implements

IDisposable