ImageEn, unit iexPdfiumCore

TPdfFormFieldList.Remove

TPdfFormFieldList.Remove


Declaration

procedure Remove(Index: Integer);


Description

Remove the form field of the specified index from the PDF page.


Examples

// Remove the highlighted form field from the PDF page
ImageEnView1.PdfViewer.FormFields.Remove( ImageEnView1.PdfViewer.FormFields.HighlightedIndex );

// Delete the item clicked on
procedure TfrmMain.ImageEnView1MouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
var
  idx: Integer;
  pt: TDPoint;
begin
  pt := ImageEnView1.PdfViewer.ScrToPage( X, Y, True );
  idx := ImageEnView1.PdfViewer.FormFields.FindFormFieldAt( pt );
  if idx > -1 then
    if MessageDlg( format( 'Delete form field %d?', [ idx + 1 ]), mtConfirmation, [ mbYes,mbNo ], 0 ) = mrYes then
      ImageEnView1.PdfViewer.FormFields.Remove( idx );
end;