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
Implements
Inherited Members
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 |
---|---|
System.Int32 | 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 |
---|---|
System.Int32 | 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[Int32]
Gets the char data.
Declaration
public byte char_data { get; }
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | i |
Property Value
Type | Description |
---|---|
System.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 |
---|---|
System.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 |
---|---|
System.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(Boolean)
Declaration
[HandleProcessCorruptedStateExceptions]
protected virtual void Dispose(bool A_0)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | A_0 |
Finalize()
Allows a CharData to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
Declaration
protected void Finalize()
get_char_data(Int32)
Declaration
public byte get_char_data(int i)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | i |
Returns
Type | Description |
---|---|
System.Byte |