PDF Creator Pilot documentation |
Download CHM version of this manual. |
|
![]() ![]() Collapse AllCreates an action for resetting PDF form fields.
|
| LONG CreateResetFormAction () |
Return value
Remarks
CreateResetFormAction is an Action category function that allows users to reset form fields in a PDF document. Use AddControlToAction to associate edit fields with this action and reset the fields. A Reset Form action resets selected PDF controls to their default values. The default value is the value of the control at time of the PDF document creation.
The return value is an action identifier in document's actions collection and can be used in AddControlToAction, OpenDocumentAction, PDFANNOTATION_OnBeforeFormatting, PDFANNOTATION_OnChange, PDFANNOTATION_OnKeyPress, PDFANNOTATION_OnSetFocus, PDFANNOTATION_OnLostFocus, PDFANNOTATION_OnMouseDown, PDFANNOTATION_OnMouseUp, PDFANNOTATION_OnMouseEnter, PDFANNOTATION_OnMouseExit, PDFANNOTATION_OnOtherControlChanged, PDFPAGE_SetAction, PDFANNOTATION_Action, PDFOUTLINENODE_Action.
Analogue in new interface: IPDFDocument4::CreateResetFormAction.
Example
{ PDF object is supposed to be created }
PDF.BeginDoc;
e1 := PDF.PDFPAGE_CreateControl_Edit('field1', 20, 20, 120, 32);
PDF.PDFANNOTATION_Text := 'some text';
e2 := PDF.PDFPAGE_CreateControl_Edit('field2', 140, 20, 240, 32);
PDF.PDFANNOTATION_Text := 'other text';
c1 := PDF.PDFPAGE_CreateControl_Checkbox('check1', 250, 20, 262, 32);
b1 := PDF.PDFPAGE_CreateControl_Button('but1', 20, 60, 80, 80);
PDF.PDFANNOTATION_Caption := 'Reset';
PDF.PDFANNOTATION_OnMouseUp := PDF.CreateResetFormAction();
PDF.EndDoc;
// PDF object is supposed to be created
PDF->BeginDoc();
LONG e1 = PDF->PDFPAGE_CreateControl_Edit("field1", 20, 20, 120, 32);
PDF->PDFANNOTATION_Text = "some text";
LONG e2 = PDF->PDFPAGE_CreateControl_Edit("field2", 140, 20, 240, 32);
PDF->PDFANNOTATION_Text = "other text";
LONG c1 = PDF->PDFPAGE_CreateControl_Checkbox("check1", 250, 20, 262, 32);
LONG b1 = PDF->PDFPAGE_CreateControl_Button("but1", 20, 60, 80, 80);
PDF->PDFANNOTATION_Caption = "Reset";
PDF->PDFANNOTATION_OnMouseUp = PDF->CreateResetFormAction();
PDF->EndDoc();
// PDF object is supposed to be created
PDF.BeginDoc();
long e1 = PDF.PDFPAGE_CreateControl_Edit("field1", 20, 20, 120, 32);
PDF.PDFANNOTATION_Text = "some text";
long e2 = PDF.PDFPAGE_CreateControl_Edit("field2", 140, 20, 240, 32);
PDF.PDFANNOTATION_Text = "other text";
long c1 = PDF.PDFPAGE_CreateControl_Checkbox("check1", 250, 20, 262, 32);
long b1 = PDF.PDFPAGE_CreateControl_Button("but1", 20, 60, 80, 80);
PDF.PDFANNOTATION_Caption = "Reset";
PDF.PDFANNOTATION_OnMouseUp = PDF.CreateResetFormAction();
PDF.EndDoc();
' PDF object is supposed to be created
PDF.BeginDoc
e1 = PDF.PDFPAGE_CreateControl_Edit("field1", 20, 20, 120, 32)
PDF.PDFANNOTATION_Text = "some text"
e2 = PDF.PDFPAGE_CreateControl_Edit("field2", 140, 20, 240, 32)
PDF.PDFANNOTATION_Text = "other text"
c1 = PDF.PDFPAGE_CreateControl_Checkbox("check1", 250, 20, 262, 32)
b1 = PDF.PDFPAGE_CreateControl_Button("but1", 20, 60, 80, 80)
PDF.PDFANNOTATION_Caption = "Reset"
PDF.PDFANNOTATION_OnMouseUp = PDF.CreateResetFormAction()
PDF.EndDoc
See Also


