THotPDF.GetLoadedTrailerID Method
Reads the unique document identifier from the Trailer dictionary of the loaded PDF document (the first element of the ID array)
Declaration
function GetLoadedTrailerID(out AID: AnsiString): boolean;
Unit
HPDFDoc
Parameters
| Name | Purpose |
|---|---|
AID | Output parameter, receives the hexadecimal string representation of the document ID |
Return value
Returns True and populates the AID if a valid ID array exists in the Trailer, otherwise returns False
Usage notes
- A PDF ID consists of two 16-byte strings; this method returns the first one (the document's original ID)
- The ID is returned as a hexadecimal string; if you need to compare whether two documents originated from the same file, you can directly compare this value
- Some non-standard generated PDFs may not contain a Trailer ID, in which case it returns False, and the AID content is undefined