ImageGear Professional v18.2 > API Reference Guide > PDF Component API Reference > PDF Component Objects > General API > IGPDFCtl Control > IGPDFCtl Methods > TranslateToHost Method |
Translates a string from Unicode or PDFDocEncoding to host encoding. This method is useful when setting or retrieving displayed text that might be in Unicode, such as text that appears in a text annotation or bookmark.
A character that cannot be converted to the destination encoding is replaced with a space.
Host encoding is a platform-dependent encoding for the host machine. For non-UNIX Roman systems, it is MacRomanEncoding in Mac OS and WinAnsiEncoding in Windows. In UNIX (except HP-UX) Roman systems, it is ISO8859-1 (ISO Latin-1); for HP-UX, it is HP-ROMAN8. See Appendix D in the PDF Reference for descriptions of MacRomanEncoding, WinAnsiEncoding, and PDFDocEncoding.
For non-Roman systems, the host encoding may be a variety of encodings, which are defined by a CMap (character map). See Section 5.6.4 in the PDF Reference for information on CMaps.
Use GetHostEncoding to determine if a system's host encoding is Roman or not.
TranslateToHost (InPDFStr As String) As String
Name | Description |
---|---|
InPDFStr | String to translate. |
Translated string.