THotPDF.SetLoadedDocumentInfo Method
Modifies the value of the specified key in the information dictionary of the loaded PDF document
Declaration
function SetLoadedDocumentInfo(const AKey, AValue: AnsiString): boolean;
Unit
HPDFDoc
Parameters
| Name | Purpose |
|---|---|
AKey | 信息字典键名,如 Title、Author、Subject、Keywords 等标准键或自定义键 |
AValue | The new value string to write to this key |
Return value
若成功更新信息字典中的指定键值则返回 True,否则返回 False
Usage notes
- 修改仅在内存中生效,需在调用完成后通过保存方法将文档写入磁盘以持久化更改
- Before calling this method on an encrypted document, ensure write permissions have been granted, otherwise the operation may be rejected
- 若
AKey在信息字典中不存在,此方法会新增该键值对;若已存在则覆盖旧值