EnumAttachments

Document properties, Extraction

Description

Enumerates the document-level embedded files and the page-level file attachment annotations of the open document into the caller's array and returns the total count, which may be larger than that array.

Syntax

Delphi

Function TPDFlib.EnumAttachments(Var Attachments: Array Of TPDFlibAttachment): Integer;

Parameters

AttachmentsA caller-sized array that receives unified TPDFlibAttachment records

Return Values

Returns the total number of reachable attachments even when the supplied array is smaller than the result

Remarks

The enumeration includes document-level /EmbeddedFiles name-tree entries and page-level /FileAttachment annotations

Each record includes file name, MIME subtype, description, size, creation and modification dates, hexadecimal checksum, associated-file relationship, and file specification object number when present

Payloads are not decoded or hashed during enumeration; use ValidateAttachmentChecksum for explicit integrity verification

See also

TPDFlibAttachment, ValidateAttachmentChecksum, SaveAllAttachmentsEx