PDFium Delphi Component Docs

DeleteAttachment 함수

컴포넌트: TPdf  ·  유닛: PDFium
지정한 index의 embedded file attachment를 제거합니다

구문

function DeleteAttachment(Index: Integer): Boolean;

설명

지정한 인덱스의 임베디드 파일 첨부를 제거합니다

삭제하면 뒤의 인덱스가 한 칸씩 당겨지므로, 여러 개를 한꺼번에 지울 때는 큰 인덱스부터 지우세요

현재 페이지에 대한 모든 편집은 PDFium의 메모리상 표현에 버퍼링됩니다. UpdatePage로 렌더링 캐시를 갱신하고 SaveAs로 변경 사항을 저장하세요

참고 사항

예제

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

관련 항목

CreateAttachment, Attachment, AttachmentCount