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;
  end;

Fields

SourceThe attachment origin specified by TPDFlibAttachmentSource.
IndexThe 1-based index within its own source collection (e.g. within the embedded file list or the page annotation list).
PageThe 1-based page number where the attachment resides if Source is asAnnotAttachment; otherwise 0 if it is document-wide (asEmbeddedFile).
FileNameThe name or Unicode path specifier of the attached file.
MIMETypeThe MIME content subtype of the embedded stream (e.g., image/jpeg or application/xml).
DescriptionA descriptive text comment for the attachment.
SizeThe uncompressed stream file size in bytes; returns 0 if size metadata is absent.

See also

TPDFlibAttachmentSource, EnumAttachments, SaveAllAttachments