ImageEn, unit iexPdfiumCore |
|
TPdfAnnotationList.Remove
Declaration
procedure Remove(Index: Integer);
Description
Remove the form field of the specified index from the PDF page.
// Remove the highlighted annotation from the PDF page
ImageEnView1.PdfViewer.Annotations.Remove( ImageEnView1.PdfViewer.Annotations.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.Annotations.FindAnnotationAt( pt );
if idx > -1 then
if MessageDlg( format( 'Delete annotation %d?', [ idx + 1 ]), mtConfirmation, [ mbYes,mbNo ], 0 ) = mrYes then
ImageEnView1.PdfViewer.Annotations.Remove( idx );
end;