PDFium Delphi Component Docs

Método AttachmentHasKey

Componente: TPdf  ·  Unidade: PDFium
Testa se um anexo incorporado contém uma determinada chave de especificação de ficheiro

Syntax

function AttachmentHasKey(Index: Integer; const Key: WString): Boolean;

IndexInteger. Zero-based index of the document-level attachment, below AttachmentCount.
KeyWString. Name of the file-specification dictionary entry, written as a PDF name.
ResultBoolean. True when the attachment carries that key.

Description

The file-specification dictionary of an embedded file (ISO 32000-1 7.11.3) holds the standard entries plus any private ones a producer adds. This probes for one key without reading it, which is how a caller distinguishes "absent" from "present but empty"

An index outside the attachment list, or a PDFium build without the capability, returns False rather than raising

Read and write the value with GetAttachmentStringValue and SetAttachmentStringValue

See Also

GetAttachmentStringValue, SetAttachmentStringValue, AttachmentName, AttachmentDescription