AddPageAssociatedFileFromFile

Embedded files

Description

Binds an embedded file read from disk to one page's /AF array

Syntax

Delphi

Function AddPageAssociatedFileFromFile(PageNumber: Integer; Const FileName, DisplayName, MIMEType, Description, Relationship: WideString): Integer;

Return values

0The file does not exist or validation failed
RefHandle of the new file specification object

Remarks

DisplayName defaults to the file name extracted from FileName when left empty. The remaining parameters and the page-level /AF semantics follow AddPageAssociatedFileFromString.

Example

PDF.AddPageAssociatedFileFromFile(2, "schema.xsd", "", "application/xml", "", "Supplement");

See also

AddAssociatedFileFromString, GetAssociatedFileCount