THPDFFormEditSession Class

Groups loaded AcroForm edits into one transaction with undo history, dirty-field tracking, regenerated appearances and constrained event actions

Declaration

THPDFFormEditSession = class(TObject)
public
  function SetFieldValue(const FieldName, Value: AnsiString): Boolean;
  function Undo: Boolean;
  function Redo: Boolean;
  procedure BindEventAction(const FieldName: AnsiString;
    EventKind: THPDFFormEventKind;
    const Action: THPDFConstrainedFormAction);
  function DispatchEvent(const FieldName: AnsiString;
    EventKind: THPDFFormEventKind;
    out AResult: THPDFFormEventResult): Boolean;
  procedure Commit;
  procedure Rollback;
  function DirtyFieldCount: Integer;
  function DirtyFieldName(Index: Integer): AnsiString;
  property Closed: Boolean read FClosed;
end;

Unit

HPDFDoc

Creation

Sessions are created by THotPDF.BeginLoadedFormEditSession for a loaded document containing at least one form field, and the caller owns and frees the returned session

Usage notes

Related APIs