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.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
Namespace: pdftron.PDF
Assembly: PDFNet.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[int]

Gets the char data.

Declaration
public byte char_data[int i] { get; }
Parameters
Type Name Description
int i
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()

Releases all resources used by the CharData

Declaration
public override sealed void Dispose()

Dispose(bool)

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

~CharData()

Allows a CharData to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.

Declaration
protected ~CharData()

get_char_data(int)

Declaration
public byte get_char_data(int i)
Parameters
Type Name Description
int i
Returns
Type Description
byte

Implements

IDisposable
In This Article
Back to top Generated by DocFX