DASetInformation
文档属性、直接访问功能
描述
设置文档信息区中的值
可以是 Author 和 Subject 等标准信息,也可以是自定义信息
对于 CreationDate 和 ModDate(修改日期),日期格式应为:D:YYYYMMDDHHmmSSOHH'mm'
where
YYYY 应为年份
MM 应为月份(01-12) DD 应为日期(01-31) HH 应为小时(00-23)
mm 表示分钟(00-59)SS 表示秒(00-59)
O 应使用 +、- 或 Z 字符表示当地时间与世界时(UT)的关系
HH 后接 APOSTROPHE(U+0027)(')应为与 UT 的小时偏移绝对值(00-23)
mm 后跟可选 APOSTROPHE (U+0027)('),应为相对于 UT 的偏移量绝对值,单位为分钟(00-59)
语法
Delphi
Function TPDFlib.DASetInformation(FileHandle: Integer; Const Key, NewValue: WideString): Integer;
ActiveX
Function PDFlib::DASetInformation(FileHandle As Long, Key As String, NewValue As String) As Long
DLL
int DLDASetInformation(int InstanceID, int FileHandle, const wchar_t * Key, const wchar_t * NewValue);
参数
| FileHandle | 由 DAOpenFile、DAOpenFileReadOnly 或 DAOpenFromStream 函数返回的句柄 |
|---|---|
| Key | 标准信息请使用 "Author"、"Title"、"Subject"、"Keywords"、"Creator"、"Producer"、"CreationDate" 或 "ModDate",自定义信息可使用任何其他字符串 |
| NewValue | 指定键的新值 |
返回值
| 0 | 指定的 FileHandle 无效 信息键已成功设置或更新 |
|---|---|
| 1 |