SetDocumentLanguageA

文件屬性、無障礙

描述

結尾的 A 表示 ANSI(char)DLL 進入點;ActiveX/COM 介面只提供 Unicode 形式。行為與 SetDocumentLanguage 完全相同,字串參數依目前 SetAnsiMode 的字碼頁解讀

在 PDF 目錄中設定文件的自然語言(/Lang 項目)。語言宣告供螢幕閱讀器與其他輔助技術套用正確的發音與文字轉語音規則

此函式直接寫入 Catalog 的 /Lang 鍵。使用 PDF/UA 模式時,語言應改由 SetPDFUAMode 的 Language 參數提供——它會在內部呼叫本函式。

語法

Delphi

Function DLSetDocumentLanguageA(InstanceID: Integer; Language: PAnsiChar): Integer;

DLL

int DLSetDocumentLanguageA(int InstanceID, const char * Language);

參數

LanguageBCP 47 語言標籤,例如 "en-US"、"fr"、"zh-TW"。不可為空。

傳回值

0語言字串為空;未做任何變更
1語言設定成功