PDFium Delphi Component Docs

AddAnnotationFileAttachment メソッド

コンポーネント: TPdf  ·  ユニット: PDFium
埋め込みファイルを既存の注釈に添付し、その内容を 1 回の呼び出しで埋めます

構文

function AddAnnotationFileAttachment(AnnotIndex: Integer; const Name: WString; const FileData: TBytes): Boolean;

AnnotIndexInteger. Zero-based index of the annotation on the current page, typically one of subtype anFileAttachment.
NameWString. File name recorded for the attachment, as a viewer would show it.
FileDataTBytes. Bytes of the embedded file. An empty array creates the attachment entry with no contents.
ResultBoolean. True when both the attachment and its contents were written.

説明

ファイルを 1 つの注釈に添付します。これは FileAttachment 注釈がペーパークリップや押しピンのマーカーとして表示するものです。ドキュメントレベルの添付ファイルは別物で、CreateAttachment を介します

成功するとページは変更済みとしてマークされ、後続の SaveAs が添付ファイルをファイルに取り込みます

False の結果は何も添付されなかったことを意味します。注釈を開けなかったか、PDFium ビルドが注釈添付ファイルをエクスポートしていないかのいずれかです

関連項目

CreateAttachment, Attachment, CreateAnnotation, AttachmentName