TPDFlibAttachment
Data Types
Description
TPDFlibAttachment is a unified record structure that describes an embedded file attachment, whether it originates from a document-level name tree or a page-level file attachment annotation.
Syntax
Delphi
type TPDFlibAttachment = record
Source: TPDFlibAttachmentSource;
Index: Integer;
Page: Integer;
FileName: WideString;
MIMEType: WideString;
Description: WideString;
Size: Int64;
CreationDate: WideString;
ModificationDate: WideString;
Checksum: AnsiString;
AFRelationship: WideString;
ObjectNumber: Integer;
end;Fields
| Source | The attachment origin specified by TPDFlibAttachmentSource |
|---|---|
| Index | The 1-based index within its own source collection |
| Page | The 1-based page number for asAnnotAttachment, or 0 for asEmbeddedFile |
| FileName | The Unicode file specification name from /UF or /F |
| MIMEType | The embedded stream MIME subtype |
| Description | The file specification or annotation description |
| Size | The uncompressed byte size from /Params /Size, or 0 when absent |
| CreationDate | The original /Params /CreationDate PDF date string |
| ModificationDate | The original /Params /ModDate PDF date string |
| Checksum | The lower-case hexadecimal form of /Params /CheckSum, or an empty string when absent |
| AFRelationship | The associated-file relationship name such as Source, Data, or Alternative |
| ObjectNumber | The indirect object number of the file specification, or 0 for a malformed direct specification |
See also
EnumAttachments reads metadata only and does not hash attachment payloads, so enumerating large files remains inexpensive
Call ValidateAttachmentChecksum when payload integrity must be verified
See also
TPDFlibAttachmentSource, EnumAttachments, ValidateAttachmentChecksum, SaveAllAttachments