Example showing how to delete the clicked item in a PDF page (PDFium):
// 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.Objects.FindObjectAt( pt );
if idx > -1 then
if MessageDlg( format( 'Delete object %d?', [ idx + 1 ]), mtConfirmation, [ mbYes,mbNo ], 0 ) = mrYes then
begin
ImageEnView1.PdfViewer.Objects.RemoveObject( idx );
ImageEnView1.Update();
end;
end;
Nigel
Xequte Software
www.imageen.com