PDFium Component Docs

OnJavaScriptResponse property

Component: TPdf  ·  Unit: PDFium
Okida se kada JavaScript akcija ugrađena u PDF zatraži interakciju sa hostom ili potvrdu upozorenja

Syntax

property OnJavaScriptResponse: TPdfJavaScriptResponseEvent read FOnJavaScriptResponse write FOnJavaScriptResponse;

Description

Occurs when scripts executing within the PDF document trigger dialog responses (such as alert inputs, passwords, or confirmations)

Parameters

SenderThe component that triggered the event
QuestionThe message prompt text supplied by the script
TitleThe title text suggested for the dialog
Default_The default value provided for input queries
cLabelA custom label string associated with the action
bPasswordTrue if the response text should be masked as a password input
Response_Output parameter to return the host's textual response back to the script engine
HandledSet this to True to indicate that the event has been handled and suppress default no-op behavior

Remarks

Example

procedure TForm1.Pdf1JavaScriptResponse(Sender: TObject; const Question, Title, Default_, cLabel: WString;
  bPassword: Boolean; out Response_: WString; var Handled: Boolean);
begin
  Response_ := InputBox(Title, Question, Default_);
  Handled := True;
end;

See Also

OnXfaGotoUrl OnXfaUriAction