DAGetInformation

文件屬性、直接存取功能

描述

從文件資訊區取出資訊,可能是 Author、Subject 這類標準資訊,也可能是自訂資訊

日期值會以儲存時的精度與時區表示法傳回,包括部分日期與 UTC Z 後綴

語法

Delphi

Function TPDFlib.DAGetInformation(FileHandle: Integer; Const Key: WideString): WideString;

ActiveX

Function PDFlib::DAGetInformation(FileHandle As Long, Key As String) As String

DLL

const wchar_t* DLDAGetInformation(int InstanceID, int FileHandle, const wchar_t* Key);
const char* DLDAGetInformationA(int InstanceID, int FileHandle, const char* Key);

參數

FileHandle由 DAOpenFile、DAOpenFileReadOnly 或 DAOpenFromStream 函式傳回的控制代碼
Key標準資訊請用 "Author"、"Title"、"Subject"、"Keywords"、"Creator" 或 "Producer";自訂資訊可用任何其他字串。

傳回值

傳回儲存在指定鍵下的值。檔案控制代碼無效或鍵不存在時傳回空字串。