PDFium Delphi Component Docs

DeleteAttachment function

Component: TPdf  ·  Unit: PDFium
Removes the embedded file attachment at the given index

Syntax

function DeleteAttachment(Index: Integer): Boolean;

Description

Removes the embedded file attachment at the given index

Indices shift down after deletion; delete top-down to remove multiple at once

All edits to the current page are buffered in PDFium's in-memory representation. Call UpdatePage to refresh the rendering cache and SaveAs to persist the changes

Remarks

Example

begin
  if Pdf1.Active and (Pdf1.AttachmentCount > 0) then
    Pdf1.DeleteAttachment(0);
end;

See Also

CreateAttachment, Attachment, AttachmentCount