Xamarin.iOS

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class PdfResetAction

    Show / Hide Table of Contents

    Class PdfResetAction

    Represents PDF form's reset action,this action allows a user to reset the form fields to their default values.

    Inheritance
    System.Object
    PdfAction
    PdfFormAction
    PdfResetAction
    Inherited Members
    PdfFormAction.Fields
    PdfAction.Next
    Namespace: Syncfusion.Pdf.Interactive
    Assembly: Syncfusion.Pdf.Portable.dll
    Syntax
    public class PdfResetAction : PdfFormAction, IPdfWrapper
    Remarks

    This PdfResetAction class is used to reset all the form fields in the PDF document. Please refer the UG docuemntation link for more details.

    Examples
    //Create a new PDF document.
    PdfDocument document = new PdfDocument();
    //Create a new page
    PdfPage page = document.Pages.Add();
    //Create a PdfButtonField
    PdfButtonField submitButton = new PdfButtonField(page, "submitButton");
    submitButton.Bounds = new RectangleF(25, 160, 100, 20);
    submitButton.Text = "Apply";
    //Create a new PdfResetAction
    PdfResetAction resetAction = new PdfResetAction();
    //Set the resetAction to submitButton
    submitButton.Actions.GotFocus = resetAction;
    //Add the submit button to a document.
    document.Form.Fields.Add(submitButton);
    //Save document to disk.
    document.Save("ResetAction.pdf");
    document.Close(true);
    'Create a new PDF document.
    Dim document As New PdfDocument()
    'Create a new page
    Dim page As PdfPage = document.Pages.Add()
    'Create a PdfButtonField
    Dim submitButton As New PdfButtonField(page, "submitButton")
    submitButton.Bounds = New RectangleF(25, 160, 100, 20)
    submitButton.Text = "Apply"
    'Create a new PdfResetAction
    Dim resetAction As New PdfResetAction()
    'Set the resetAction to submitButton
    submitButton.Actions.GotFocus = resetAction
    'Add the submit button to a document.
    document.Form.Fields.Add(submitButton)
    'Save document to disk.
    document.Save("ResetAction.pdf")
    document.Close(True)

    Constructors

    PdfResetAction()

    Initializes a new instance of the PdfResetAction class.

    Declaration
    public PdfResetAction()
    Examples
    //Create a new PDF document.
    PdfDocument document = new PdfDocument();
    //Create a new page
    PdfPage page = document.Pages.Add();
    //Create a PdfButtonField
    PdfButtonField submitButton = new PdfButtonField(page, "submitButton");
    submitButton.Bounds = new RectangleF(25, 160, 100, 20);
    submitButton.Text = "Apply";
    //Create a new PdfResetAction
    PdfResetAction resetAction = new PdfResetAction();
    //Set the resetAction to submitButton
    submitButton.Actions.GotFocus = resetAction;
    //Add the submit button to a document.
    document.Form.Fields.Add(submitButton);
    //Save document to disk.
    document.Save("ResetAction.pdf");
    document.Close(true);
    'Create a new PDF document.
    Dim document As New PdfDocument()
    'Create a new page
    Dim page As PdfPage = document.Pages.Add()
    'Create a PdfButtonField
    Dim submitButton As New PdfButtonField(page, "submitButton")
    submitButton.Bounds = New RectangleF(25, 160, 100, 20)
    submitButton.Text = "Apply"
    'Create a new PdfResetAction
    Dim resetAction As New PdfResetAction()
    'Set the resetAction to submitButton
    submitButton.Actions.GotFocus = resetAction
    'Add the submit button to a document.
    document.Form.Fields.Add(submitButton)
    'Save document to disk.
    document.Save("ResetAction.pdf")
    document.Close(True)
    See Also
    PdfDocument
    PdfPage
    PdfButtonField

    Properties

    Include

    Gets or sets a value indicating whether fields contained in Fields collection will be included for resetting.

    Declaration
    public override bool Include { get; set; }
    Property Value
    Type Description
    System.Boolean

    true if include; otherwise, false.

    Overrides
    PdfFormAction.Include
    Remarks

    If Include property is true, only the fields in this collection will be reset. If Include property is false, the fields in this collection are not reset and only the remaining form fields are reset. If the collection is null or empty, then all the form fields are reset and the Include property is ignored.

    Examples
    //Create a new PDF document.
    PdfDocument document = new PdfDocument();
    //Create a new page
    PdfPage page = document.Pages.Add();
    //Create a PdfButtonField
    PdfButtonField submitButton = new PdfButtonField(page, "submitButton");
    submitButton.Bounds = new RectangleF(25, 160, 100, 20);
    submitButton.Text = "Apply";
    //Create a new PdfResetAction
    PdfResetAction resetAction = new PdfResetAction();
    resetAction.Include=true;
    //Set the resetAction to submitButton
    submitButton.Actions.GotFocus = resetAction;
    //Add the submit button to a document.
    document.Form.Fields.Add(submitButton);
    //Save document to disk.
    document.Save("ResetAction.pdf");
    document.Close(true);
    'Create a new PDF document.
    Dim document As New PdfDocument()
    'Create a new page
    Dim page As PdfPage = document.Pages.Add()
    'Create a PdfButtonField
    Dim submitButton As New PdfButtonField(page, "submitButton")
    submitButton.Bounds = New RectangleF(25, 160, 100, 20)
    submitButton.Text = "Apply"
    'Create a new PdfResetAction
    Dim resetAction As New PdfResetAction()
    resetAction.Include=True
    'Set the resetAction to submitButton
    submitButton.Actions.GotFocus = resetAction
    'Add the submit button to a document.
    document.Form.Fields.Add(submitButton)
    'Save document to disk.
    document.Save("ResetAction.pdf")
    document.Close(True)
    See Also
    PdfDocument
    PdfPage
    PdfButtonField

    Methods

    Initialize()

    Initializes an instance.

    Declaration
    protected override void Initialize()
    Overrides
    PdfAction.Initialize()

    See Also

    PdfDocument
    PdfPage
    PdfButtonField
    Back to top Generated by DocFX
    Copyright © 2001 - 2023 Syncfusion Inc. All Rights Reserved