SaveAnnotAttachmentToFile

Viewer interaction, annotations and hotspot links

Description

Writes the embedded file carried by a FileAttachment annotation to FileName, selecting APage firstAnnotIndex is the 1-based annotation index on the page, and the call delegates to

GetAnnotEmbeddedFileToFile

Syntax

Delphi

Function TPDFlibViewer.SaveAnnotAttachmentToFile(APage, AnnotIndex: Integer; Const FileName: WideString): Integer;

Parameters

APage1-based page holding the annotation
AnnotIndex1-based annotation index on APage
FileNameTarget path for the embedded file

Return values

0No document is open, the page is out of range, or the annotation carries no file
1The embedded file was written

See also

GetAnnotEmbeddedFileToFile, OnAnnotClick, TPDFlibViewer