AddPageAssociatedFileFromFile

內嵌檔案

描述

將從磁碟讀取的內嵌檔案繫結至單一頁面的 /AF 陣列

語法

Delphi

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

參數

PageNumber接收檔案規格的 /AF 陣列所屬頁碼(1 起算)
FileName要內嵌之既有檔案的路徑
DisplayName內嵌檔案的顯示名稱;空值會採用來源檔名(不含目錄路徑),產生的標題不得與既有內嵌檔案標題重複
MIMEType儲存於檔案規格的 MIME 型別;不得為空
Description儲存於關聯檔案項目的選填描述;可為空
Relationship關聯角色,可為 Source、Data、Alternative、Supplement 或 Unspecified

傳回值

0檔案不存在或驗證失敗
Ref新檔案規格物件的控制代碼

備註

DisplayName 留空時預設為從 FileName 擷取的檔名。其餘參數與頁面層級 /AF 語意遵循 AddPageAssociatedFileFromString

範例

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

另請參閱

AddAssociatedFileFromString, GetAssociatedFileCount