GetPageAssociatedFileEmbeddedIndex

Embedded files

Description

Returns the embedded stream object number of one page /AF entry

Syntax

Delphi

Function GetPageAssociatedFileEmbeddedIndex(PageNumber, Index: Integer): Integer;

Parameters

PageNumberOne-based page number that owns the /AF array
IndexZero-based position within that page /AF array

Return values

0The page or the index is out of range, or the entry has no /EF /F stream reference
NObject number of the embedded file stream

Remarks

Index is zero-based within the page /AF array. The returned object number can be used with GetEmbeddedFileStrProperty and GetEmbeddedFileContentToString after locating the attachment through the EmbeddedFiles name tree.

Example

ObjNum:= PDF.GetPageAssociatedFileEmbeddedIndex(1, 0);

See also

AddAssociatedFileFromString, GetAssociatedFileCount