function FormCanUndo: Boolean;
FormCanUndo käärii PDFiumin FORM_CanUndo. Se palauttaa
True when the FOCUSED AcroForm widget has at least one
edit in its undo history that FormUndo could roll back,
ja False muuten.
Returns False when the view is inactive, the
document has no AcroForm, or no widget is focused — matching
the contract of the other five form-edit helpers.
The natural use is as the Enabled-state expression for an Undo menu item, toolbar button, or context-menu entry.
procedure TForm1.EditMenuPopup(Sender: TObject);
begin
miUndo.Enabled := PdfView1.FormCanUndo;
miRedo.Enabled := PdfView1.FormCanRedo;
end;