PDFium Delphi Component Docs

GetAttachmentStringValue method

Component: TPdf  ·  Unit: PDFium
Read one string entry from the file-specification dictionary of an attachment

Syntax

function GetAttachmentStringValue(Index: Integer; const Key: WString): WString;

IndexInteger. Zero-based index of the document-level attachment
KeyWString. Name of the file-specification dictionary entry
ResultWString. The stored value, or an empty string when the key is absent or holds no text

Description

Reads private metadata a producer stored alongside an embedded file - a source path, a content hash, a workflow marker - without going through the raw document structure

An empty result covers both a missing key and an empty value; use AttachmentHasKey when the difference matters

The standard entries have their own properties: AttachmentName, AttachmentType and AttachmentDescription

See Also

SetAttachmentStringValue, AttachmentHasKey, Attachment, AttachmentDescription