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
Returns True when the document has an information dictionary and at least one field was read successfully
Usage notes
- All fields in the PDF information dictionary are optional; even when True is returned, individual fields may be empty
- 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