Click or drag to resize

FontMapToUnicode Method

Maps the encoding specific 'Charcode' to Unicode. Conversion of 'Charcode' to Unicode can result in up to four Unicode Characters.

Namespace:  pdftron.PDF
Assembly:  pdftron (in pdftron.dll) Version: 255.255.255.255
Syntax
public bool MapToUnicode(
	int char_code,
	IntArrayRef out_unicode,
	int in_uni_sz,
	Int32Ref out_chars
)

Parameters

char_code
Type: SystemInt32
encoding specific 'Charcode' that needs to be converted to Unicode.
out_unicode
Type: pdftron.CommonIntArrayRef
A IntArrayRef where the conversion result will be stored.
in_uni_sz
Type: SystemInt32
The number of Characters that can be written to out_unicode. You can assume that the function will never map to more than 10 Characters.
out_chars
Type: pdftron.CommonInt32Ref
The function will modify this value to return the number of Unicode Characters written in 'out_unicode' Array.

Return Value

Type: Boolean
true if char_code was mapped to Unicode public area or false if the char_code was mapped to Unicode private area. A char_code is mapped to Unicode private area when the information required for proper mapping is missing in PDF document (e.g. a predefined encoding or ToUnicode CMap).
Remarks
This function is not applicable to CIDFonts (e_CIDType0 and e_CIDType2) and will throw an exception if called.
See Also