EnumAttachments

Document properties, Extraction

Description

This page describes EnumAttachments in PDFlibPas under the "Document properties, Extraction" topic. API names, parameters, class names, filenames, and literals are kept exactly as they appear in the Delphi library and DLL entry points.

Review the syntax, parameters, and return values before calling the function.

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