Class: CharData

Core.PDFNet. CharData


new CharData(charData)

CharData is a data structure returned by PDFNet.Iterator.current() 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.
Parameters:
Name Type Description
charData object An object to construct PDFNet.CharData with
Properties:
Name Type Description
char_code number '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.
x number glyph horizontal position
y number glyph vertical position
char_data Uint8Array the buffer containing character data. For simple fonts each character is represented by a single byte. For multi-byte (CID or Type0) fonts each character may take more than one byte.
bytes number Number of bytes representing this character in char_data buffer. For simple fonts 'bytes' will equal 1. For multi-byte (CID or Type0) fonts 'bytes' may be larger than 1. Should not be less than 0.