PDFium Delphi Component Docs

Annotation 屬性

元件: TPdf  ·  單元: PDFium
索引屬性 — 傳回或更新目前頁面上指定索引的註解記錄

語法

property Annotation[Index: Integer]: TPdfAnnotation; // read/write

說明

索引讀寫屬性,傳回或更新目前頁面上指定索引的註解記錄

需要 Active 為 True。索引超出有效範圍時結果未定義;請在 0 .. AnnotationCount - 1 範圍內傳值

傳回的記錄是呼叫當時值的快照;後續對文件的編輯不會修改先前傳回的記錄

AttachmentPointSets 包含多行 highlight、underline、squiggly 與 strikeout 註解使用的每個四邊形;AttachmentPoints 仍是第一個集合的相容性別名

帶 /URI 動作的 anLink annotation HasLinkUri 會填入 True,LinkUri 則保存解碼後的 URI 目標字串;沒有 /URI 動作的連結 annotation 會讓 HasLinkUri 維持 False,因此往返更新可保留非 URI 的連結動作

指派記錄會將變更的值寫回註解;當既有的字串必須被明確清空時,請設定 Has* 哨兵值

參數

Index以 0 起算的索引,範圍 0 .. AnnotationCount - 1。

備註

範例

var
  I: Integer;
begin
  if not Pdf1.Active then Exit;
  for I := 0 to Pdf1.AnnotationCount - 1 do
  begin
    // inspect Pdf1.Annotation[I]
    Memo1.Lines.Add(IntToStr(I));
  end;
end;

另請參閱

AnnotationCount, CreateAnnotation, DeleteAnnotation