AddFileAttachment

Document properties

Description

Makes an embedded file available as an attachment in the PDF viewer, if it supports this functionality. Adobe Reader 7 and later allow the user to work with file attachments.

First use the AddEmbeddedFile function to embed the file into the PDF.

Syntax

Delphi

function TPDFlib.AddFileAttachment(Const Title: WideString; EmbeddedFileID: Integer): Integer;

ActiveX

Function PDFlib::AddFileAttachment(Title As String, EmbeddedFileID As Long) As Long

DLL

int DLAddFileAttachment(int InstanceID, wchar_t * Title, int EmbeddedFileID);

Parameters

TitleThe title of the attachment that should appear in the PDF viewer
EmbeddedFileIDThe value returned from the AddEmbeddedFile function

Return values

0The EmbeddedFileID parameter was invalid, or the Title was blank
1The embedded file was made available as an attachment successfully