THotPDF.GetLoadedInfoKeyValue Method
Reads and returns the corresponding property value in the Document Information Dictionary of the loaded PDF document based on the specified property key name.
Declaration
function GetLoadedInfoKeyValue(const AKey: AnsiString): AnsiString;
Unit
HPDFDoc
Parameters
| Name | Purpose |
|---|---|
AKey | 要查询的元数据属性键名,例如 'Title'、'Author'、'Subject' 或自定义键名。 |
Return value
Returns the string value corresponding to the key name. Returns an empty string if the specified key does not exist or the document lacks an information dictionary.
Usage notes
- 常见的标准 PDF 属性键名包括
Title(标题)、Author(作者)、Subject(主题)、Keywords(关键字)、Creator(创建程序)和Producer(生成引擎)。 - 此方法只访问经典的文档信息字典,不会自动解析基于 XMP 的元数据流。如果需要访问 XMP,请使用
GetLoadedXMPMetadata。