SetDocumentLanguageA
Document properties, Accessibility
Description
The trailing A denotes the ANSI (char) DLL entry point; the ActiveX/COM surface exposes only the Unicode form. Behaviour is identical to SetDocumentLanguage and string arguments are interpreted using the current SetAnsiMode code page
Sets the document's natural language in the PDF Catalog (/Lang entry). The language declaration is used by screen readers and other assistive technology to apply correct pronunciation and text-to-speech rules.
This function writes the Catalog /Lang key directly. When using PDF/UA mode, the language should instead be supplied via the SetPDFUAMode Language parameter, which calls this function internally.
Syntax
Delphi
Function DLSetDocumentLanguageA(InstanceID: Integer; Language: PAnsiChar): Integer;
DLL
int DLSetDocumentLanguageA(int InstanceID, const char * Language);
Parameters
| Language | BCP 47 language tag, e.g. "en-US", "fr", "zh-TW". Must be non-empty. |
|---|
Return values
| 0 | Language string was empty; no change was made |
|---|---|
| 1 | Language was set successfully |