THotPDF.SetStructurePronunciation Method
Adds an exact pronunciation replacement and its inherited phonetic alphabet to an existing PDF 2.0 structure element
Declaration
procedure SetStructurePronunciation(
Elem: THPDFDictionaryObject;
const Phoneme: AnsiString;
const PhoneticAlphabet: AnsiString = 'ipa');
Parameters
| Parameter | Purpose |
|---|---|
Elem | Existing structure element that owns the pronunciation hint |
Phoneme | Non-empty exact replacement interpreted by the effective phonetic alphabet |
PhoneticAlphabet | Non-empty PDF name inherited by descendant structure elements unless overridden, defaulting to ipa |
Behavior
- The method requires PDF 2.0 and follows
StrictVersionLockbehavior - Existing
PhonemeandPhoneticAlphabetentries are replaced atomically at the dictionary level - Defined alphabet names include
ipa,x-sampa,zh-Latn-pinyin, andzh-Latn-wadegile, while PDF 2.0 permits other names - Use
AddPronunciationLexiconwhen document-level PLS lookup rules are preferable to per-element replacement text