SetDocumentLanguage

文件屬性、無障礙

描述

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

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

語法

Delphi

Function TPDFlib.SetDocumentLanguage(Const Language: WideString): Integer;

ActiveX

Function PDFlib::SetDocumentLanguage(Language As String) As Long

DLL

int DLSetDocumentLanguage(int InstanceID, const wchar_t * Language);

參數

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

傳回值

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