THotPDF.GetLoadedDocumentInfo Method
Reads the title, author, subject, keywords, creation tool, and generator tool metadata fields from the information dictionary of the loaded PDF document in one go
Declaration
function GetLoadedDocumentInfo(out ATitle, AAuthor, ASubject, AKeywords, ACreator, AProducer: AnsiString): boolean;
Unit
HPDFDoc
Parameters
| Name | Purpose |
|---|---|
ATitle | Output parameter, receives the value of the Title field in the document information dictionary |
AAuthor | Output parameter, receives the value of the Author field |
ASubject | Output parameter, receives the value of the Subject field |
AKeywords | Output parameter, receives the value of the Keywords field |
ACreator | Output parameter, receives the value of the Creator field (the application that created the original document) |
AProducer | Output parameter, receives the value of the Producer field (the tool used to convert the document to PDF) |
Return value
若文档包含信息字典且至少成功读取一个字段则返回 True;文档无信息字典时返回 False,所有输出参数为空字符串
Usage notes
- PDF 信息字典中的字段均为可选项,即使返回
True,某些输出参数也可能为空字符串 - Some older PDF generators store strings in UTF-16BE BOM encoding; the method automatically converts them to AnsiString. It is advisable to check the actual content when multibyte characters are present
- If richer metadata (such as creation date or modification date) is required, the corresponding key values of the document information dictionary object should be accessed directly