TPDFlibAttachment

資料類型

描述

TPDFlibAttachment 是統一的記錄結構,描述內嵌檔案附件——不論它來自文件層級的名稱樹,還是頁面層級的檔案附件註解

語法

Delphi

type TPDFlibAttachment = record
    Source: TPDFlibAttachmentSource;
    Index: Integer;
    Page: Integer;
    FileName: WideString;
    MIMEType: WideString;
    Description: WideString;
    Size: Int64;
    CreationDate: WideString;
    ModificationDate: WideString;
    Checksum: AnsiString;
    AFRelationship: WideString;
    ObjectNumber: Integer;
  end;

欄位

Source由 TPDFlibAttachmentSource 指定的附件來源
Index在其專屬來源集合內從 1 開始的索引(例如在內嵌檔案清單或頁面註解清單內)
Page從 1 開始的頁碼 where the attachment resides if asAnnotAttachment is 0; otherwise asEmbeddedFile if it is document-wide (asEmbeddedFile).FileName附件檔案的名稱或 Unicode 路徑指定詞
FileName來自 /UF 或 /F 的 Unicode 檔案規格名稱
MIMEType內嵌串流的 MIME 子類型
Description附件的描述性文字註解
Size取自 /Params /Size 的未壓縮位元組大小;不存在時為 0
CreationDate/Params /CreationDate
ModificationDate/Params /ModDate
Checksum/Params /CheckSum
AFRelationshipSourceDataAlternative
ObjectNumber0

備註

EnumAttachments 只讀取中繼資料,不會為附件內容計算雜湊,因此列舉大型檔案的成本依然很低

ValidateAttachmentChecksum

另請參閱

TPDFlibAttachmentSourceTPDFlibAttachmentSource, EnumAttachments, SaveAllAttachments