PDFium Delphi Component Docs

RemoveAnnotationObject 方法

元件: TPdf  ·  單元: PDFium
從註解中刪除單一頁面物件

語法

procedure RemoveAnnotationObject(Index, ObjectIndex: Integer);

IndexInteger。註解在目前頁面上以零為基底的索引
ObjectIndexInteger。要刪除之物件以零為基底的索引,須小於 AnnotationObjectCount。超出範圍的索引會引發 EPdfError

說明

從筆跡或圖章註解中移除單一筆畫或形狀,而不影響其餘部分、註解字典或頁面內容

移除後,後續物件會重新編號,因此若要在迴圈中刪除多個物件,應反向走訪索引

在不支援註解物件編輯的 PDFium 組建上,呼叫會直接引發例外而非靜默失敗,呼叫端因此一定會知道編輯未發生

另請參閱

AnnotationObjectCount, AddPathToAnnotation, DeleteAnnotation, UpdateAnnotationObject