Class PdfSubmitAction
Represents PDF form's submit action.submit action allows submission of data that is entered in the PDF form
Namespace: Syncfusion.Pdf.Interactive
Assembly: Syncfusion.Pdf.NET.dll
Syntax
public class PdfSubmitAction : PdfFormAction, IPdfWrapper
Examples
//Create a PDF document
PdfDocument document = new PdfDocument();
//Add a new page
PdfPage page = document.Pages.Add();
// Create a Button field.
PdfButtonField submitButton = new PdfButtonField(page, "Submit data");
submitButton.Bounds = new RectangleF(100, 60, 50, 20);
submitButton.ToolTip = "Submit";
document.Form.Fields.Add(submitButton);
// Create a submit action. It submit the data of the form fields to the mentioned URL
PdfSubmitAction submitAction = new PdfSubmitAction("http://www.example.com/Submit.aspx");
submitAction.DataFormat = SubmitDataFormat.Html;
submitButton.Actions.GotFocus = submitAction;
//Save and close the PDF document
document.Save("Output.pdf");
document.Close(true);
'Create a PDF document
Dim document As New PdfDocument()
'Add a new page
Dim page As PdfPage = document.Pages.Add()
' Create a Button field.
Dim submitButton As New PdfButtonField(page, "Submit data")
submitButton.Bounds = New RectangleF(100, 60, 50, 20)
submitButton.ToolTip = "Submit"
document.Form.Fields.Add(submitButton)
' Create a submit action. It submit the data of the form fields to the mentioned URL
Dim submitAction As New PdfSubmitAction("http://www.example.com/Submit.aspx")
submitAction.DataFormat = SubmitDataFormat.Html
submitButton.Actions.GotFocus = submitAction
'Save and close the PDF document
document.Save("Output.pdf")
document.Close(True)
Constructors
PdfSubmitAction(String)
Initializes a new instance of the PdfSubmitAction class with URL to submit the form data
Declaration
public PdfSubmitAction(string url)
Parameters
Type | Name | Description |
---|---|---|
System.String | url | The URL. |
Examples
//Create a PDF document
PdfDocument document = new PdfDocument();
//Add a new page
PdfPage page = document.Pages.Add();
// Create a Button field.
PdfButtonField submitButton = new PdfButtonField(page, "Submit data");
submitButton.Bounds = new RectangleF(100, 60, 50, 20);
submitButton.ToolTip = "Submit";
document.Form.Fields.Add(submitButton);
// Create a submit action. It submit the data of the form fields to the mentioned URL
PdfSubmitAction submitAction = new PdfSubmitAction(""http://www.example.com/Submit.aspx"");
submitAction.DataFormat = SubmitDataFormat.Html;
submitButton.Actions.GotFocus = submitAction;
//Save and close the PDF document
document.Save("Output.pdf");
document.Close(true);
'Create a PDF document
Dim document As New PdfDocument()
'Add a new page
Dim page As PdfPage = document.Pages.Add()
' Create a Button field.
Dim submitButton As New PdfButtonField(page, "Submit data")
submitButton.Bounds = New RectangleF(100, 60, 50, 20)
submitButton.ToolTip = "Submit"
document.Form.Fields.Add(submitButton)
' Create a submit action. It submit the data of the form fields to the mentioned URL
Dim submitAction As New PdfSubmitAction("http://www.example.com/Submit.aspx")
submitAction.DataFormat = SubmitDataFormat.Html
submitButton.Actions.GotFocus = submitAction
'Save and close the PDF document
document.Save("Output.pdf")
document.Close(True)
See Also
Properties
CanonicalDateTimeFormat
If set, any submitted field values representing dates are converted to the standard format. The interpretation of a form field as a date is not specified explicitly in the field itself but only in the JavaScript code that processes it.
Declaration
public bool CanonicalDateTimeFormat { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Examples
//Create a PDF document
PdfDocument document = new PdfDocument();
//Add a new page
PdfPage page = document.Pages.Add();
// Create a Button field.
PdfButtonField submitButton = new PdfButtonField(page, "Submit data");
submitButton.Bounds = new RectangleF(100, 60, 50, 20);
submitButton.ToolTip = "Submit";
document.Form.Fields.Add(submitButton);
// Create a submit action. It submit the data of the form fields to the mentioned URL
PdfSubmitAction submitAction = new PdfSubmitAction("http://www.example.com/Submit.aspx");
submitAction.DataFormat = SubmitDataFormat.Html;
//Sets the CanonicalDateTimeFormat to submit action
submitAction.CanonicalDateTimeFormat=true;
submitButton.Actions.GotFocus = submitAction;
//Save and close the PDF document
document.Save("Output.pdf");
document.Close(true);
'Create a PDF document
Dim document As New PdfDocument()
'Add a new page
Dim page As PdfPage = document.Pages.Add()
' Create a Button field.
Dim submitButton As New PdfButtonField(page, "Submit data")
submitButton.Bounds = New RectangleF(100, 60, 50, 20)
submitButton.ToolTip = "Submit"
document.Form.Fields.Add(submitButton)
' Create a submit action. It submit the data of the form fields to the mentioned URL
Dim submitAction As New PdfSubmitAction("http://www.example.com/Submit.aspx")
submitAction.DataFormat = SubmitDataFormat.Html
'Sets the CanonicalDateTimeFormat to submit action
submitAction.CanonicalDateTimeFormat=True
submitButton.Actions.GotFocus = submitAction
'Save and close the PDF document
document.Save("Output.pdf")
document.Close(True)
See Also
DataFormat
Gets or sets the SubmitDataFormat
Declaration
public SubmitDataFormat DataFormat { get; set; }
Property Value
Type | Description |
---|---|
SubmitDataFormat | The SubmitDataFormat |
Examples
//Create a PDF document
PdfDocument document = new PdfDocument();
//Add a new page
PdfPage page = document.Pages.Add();
// Create a Button field.
PdfButtonField submitButton = new PdfButtonField(page, "Submit data");
submitButton.Bounds = new RectangleF(100, 60, 50, 20);
submitButton.ToolTip = "Submit";
document.Form.Fields.Add(submitButton);
// Create a submit action. It submit the data of the form fields to the mentioned URL
PdfSubmitAction submitAction = new PdfSubmitAction("http://www.example.com/Submit.aspx");
submitAction.DataFormat = SubmitDataFormat.Html;
submitButton.Actions.GotFocus = submitAction;
//Save and close the PDF document
document.Save("Output.pdf");
document.Close(true);
'Create a PDF document
Dim document As New PdfDocument()
'Add a new page
Dim page As PdfPage = document.Pages.Add()
' Create a Button field.
Dim submitButton As New PdfButtonField(page, "Submit data")
submitButton.Bounds = New RectangleF(100, 60, 50, 20)
submitButton.ToolTip = "Submit"
document.Form.Fields.Add(submitButton)
' Create a submit action. It submit the data of the form fields to the mentioned URL
Dim submitAction As New PdfSubmitAction("http://www.example.com/Submit.aspx")
submitAction.DataFormat = SubmitDataFormat.Html
submitButton.Actions.GotFocus = submitAction
'Save and close the PDF document
document.Save("Output.pdf")
document.Close(True)
See Also
EmbedForm
Gets or sets a value indicating whether to include form to submit data stream. Meaningful only when the form is being submitted in Forms Data Format. If set, the property is a file name containing an embedded file stream representing the PDF file from which the FDF is being submitted.
Declaration
public bool EmbedForm { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Examples
//Create a PDF document
PdfDocument document = new PdfDocument();
//Add a new page
PdfPage page = document.Pages.Add();
// Create a Button field.
PdfButtonField submitButton = new PdfButtonField(page, "Submit data");
submitButton.Bounds = new RectangleF(100, 60, 50, 20);
submitButton.ToolTip = "Submit";
document.Form.Fields.Add(submitButton);
// Create a submit action. It submit the data of the form fields to the mentioned URL
PdfSubmitAction submitAction = new PdfSubmitAction("http://www.example.com/Submit.aspx");
submitAction.DataFormat = SubmitDataFormat.Html;
//Sets the EmbedForm option to submit action
submitAction.EmbedForm=true;
submitButton.Actions.GotFocus = submitAction;
//Save and close the PDF document
document.Save("Output.pdf");
document.Close(true);
'Create a PDF document
Dim document As New PdfDocument()
'Add a new page
Dim page As PdfPage = document.Pages.Add()
' Create a Button field.
Dim submitButton As New PdfButtonField(page, "Submit data")
submitButton.Bounds = New RectangleF(100, 60, 50, 20)
submitButton.ToolTip = "Submit"
document.Form.Fields.Add(submitButton)
' Create a submit action. It submit the data of the form fields to the mentioned URL
Dim submitAction As New PdfSubmitAction("http://www.example.com/Submit.aspx")
submitAction.DataFormat = SubmitDataFormat.Html
'Set the EmbedForm option to submit action
submitAction.EmbedForm=True
submitButton.Actions.GotFocus = submitAction
'Save and close the PDF document
document.Save("Output.pdf")
document.Close(True)
See Also
ExcludeNonUserAnnotations
Gets or sets a value indicating whether to exclude non user annotations form submit data stream. Meaningful only when the form is being submitted in Forms Data Format and the IncludeAnnotations property is set to true.
Declaration
public bool ExcludeNonUserAnnotations { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Examples
//Create a PDF document
PdfDocument document = new PdfDocument();
//Add a new page
PdfPage page = document.Pages.Add();
// Create a Button field.
PdfButtonField submitButton = new PdfButtonField(page, "Submit data");
submitButton.Bounds = new RectangleF(100, 60, 50, 20);
submitButton.ToolTip = "Submit";
document.Form.Fields.Add(submitButton);
// Create a submit action. It submit the data of the form fields to the mentioned URL
PdfSubmitAction submitAction = new PdfSubmitAction("http://www.example.com/Submit.aspx");
submitAction.DataFormat = SubmitDataFormat.Html;
//Set the ExcludeNonUserAnnotations to submit action
submitAction.ExcludeNonUserAnnotations=true;
submitButton.Actions.GotFocus = submitAction;
//Save and close the PDF document
document.Save("Output.pdf");
document.Close(true);
'Create a PDF document
Dim document As New PdfDocument()
'Add a new page
Dim page As PdfPage = document.Pages.Add()
' Create a Button field.
Dim submitButton As New PdfButtonField(page, "Submit data")
submitButton.Bounds = New RectangleF(100, 60, 50, 20)
submitButton.ToolTip = "Submit"
document.Form.Fields.Add(submitButton)
' Create a submit action. It submit the data of the form fields to the mentioned URL
Dim submitAction As New PdfSubmitAction("http://www.example.com/Submit.aspx")
submitAction.DataFormat = SubmitDataFormat.Html
'Set the ExcludeNonUserAnnotations to submit action
submitAction.ExcludeNonUserAnnotations=True
submitButton.Actions.GotFocus = submitAction
'Save and close the PDF document
document.Save("Output.pdf")
document.Close(True)
See Also
HttpMethod
Gets or sets the HTTP method.
Declaration
public HttpMethod HttpMethod { get; set; }
Property Value
Type | Description |
---|---|
HttpMethod | The HTTP method. |
Examples
//Create a PDF document
PdfDocument document = new PdfDocument();
//Add a new page
PdfPage page = document.Pages.Add();
//Create a Button field.
PdfButtonField submitButton = new PdfButtonField(page, "Submit data");
submitButton.Bounds = new RectangleF(100, 60, 50, 20);
submitButton.ToolTip = "Submit";
document.Form.Fields.Add(submitButton);
//Create a submit action. It submit the data of the form fields to the mentioned URL
PdfSubmitAction submitAction = new PdfSubmitAction(""http://www.example.com/Submit.aspx"");
submitAction.DataFormat = SubmitDataFormat.Html;
//Set the HttpMethod to submit action
submitAction.HttpMethod=HttpMethod.Post;
submitButton.Actions.GotFocus = submitAction;
//Save and close the PDF document
document.Save("Output.pdf");
document.Close(true);
'Create a PDF document
Dim document As New PdfDocument()
'Add a new page
Dim page As PdfPage = document.Pages.Add()
'Create a Button field.
Dim submitButton As New PdfButtonField(page, "Submit data")
submitButton.Bounds = New RectangleF(100, 60, 50, 20)
submitButton.ToolTip = "Submit"
document.Form.Fields.Add(submitButton)
'Create a submit action. It submit the data of the form fields to the mentioned URL
Dim submitAction As New PdfSubmitAction("http://www.example.com/Submit.aspx")
'Set the HttpMethod to submit action
submitAction.HttpMethod=HttpMethod.Post
submitButton.Actions.GotFocus = submitAction
'Save and close the PDF document
document.Save("Output.pdf")
document.Close(True)
See Also
Include
Gets or sets a value indicating whether fields contained in Fields collection will be included for submitting.
Declaration
public override bool Include { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Overrides
Remarks
If Include property is true, only the fields in this collection will be submitted. If Include property is false, the fields in this collection are not submitted and only the remaining form fields are submitted. If the collection is null or empty, then all the form fields are reset and the Include property is ignored. If the field has Export property set to false it will be not included for submitting in any case.
Examples
//Create a PDF document
PdfDocument document = new PdfDocument();
//Add a new page
PdfPage page = document.Pages.Add();
// Create a Button field.
PdfButtonField submitButton = new PdfButtonField(page, "Submit data");
submitButton.Bounds = new RectangleF(100, 60, 50, 20);
submitButton.ToolTip = "Submit";
document.Form.Fields.Add(submitButton);
// Create a submit action. It submit the data of the form fields to the mentioned URL
PdfSubmitAction submitAction = new PdfSubmitAction("http://www.example.com/Submit.aspx");
submitAction.DataFormat = SubmitDataFormat.Html;
//Sets the Include option to submit action
submitAction.Include=true;
submitButton.Actions.GotFocus = submitAction;
//Save and close the PDF document
document.Save("Output.pdf");
document.Close(true);
'Create a PDF document
Dim document As New PdfDocument()
'Add a new page
Dim page As PdfPage = document.Pages.Add()
' Create a Button field.
Dim submitButton As New PdfButtonField(page, "Submit data")
submitButton.Bounds = New RectangleF(100, 60, 50, 20)
submitButton.ToolTip = "Submit"
document.Form.Fields.Add(submitButton)
' Create a submit action. It submit the data of the form fields to the mentioned URL
Dim submitAction As New PdfSubmitAction("http://www.example.com/Submit.aspx")
submitAction.DataFormat = SubmitDataFormat.Html
'Sets the Include option to submit action
submitAction.Include=True
submitButton.Actions.GotFocus = submitAction
'Save and close the PDF document
document.Save("Output.pdf")
document.Close(True)
See Also
IncludeAnnotations
Gets or sets a value indicating whether to submit annotations. Meaningful only when the form is being submitted in Forms Data Format. If set, the submitted FDF file includes all markup annotations in the underlying PDF document. If clear, markup annotations are not included.
Declaration
public bool IncludeAnnotations { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Examples
//Create a PDF document
PdfDocument document = new PdfDocument();
//Add a new page
PdfPage page = document.Pages.Add();
// Create a Button field.
PdfButtonField submitButton = new PdfButtonField(page, "Submit data");
submitButton.Bounds = new RectangleF(100, 60, 50, 20);
submitButton.ToolTip = "Submit";
document.Form.Fields.Add(submitButton);
// Create a submit action. It submit the data of the form fields to the mentioned URL
PdfSubmitAction submitAction = new PdfSubmitAction("http://www.example.com/Submit.aspx");
submitAction.DataFormat = SubmitDataFormat.Html;
//Sets the IncludeAnnotations to submit action
submitAction.IncludeAnnotations=true;
submitButton.Actions.GotFocus = submitAction;
//Save and close the PDF document
document.Save("Output.pdf");
document.Close(true);
'Create a PDF document
Dim document As New PdfDocument()
'Add a new page
Dim page As PdfPage = document.Pages.Add()
' Create a Button field.
Dim submitButton As New PdfButtonField(page, "Submit data")
submitButton.Bounds = New RectangleF(100, 60, 50, 20)
submitButton.ToolTip = "Submit"
document.Form.Fields.Add(submitButton)
' Create a submit action. It submit the data of the form fields to the mentioned URL
Dim submitAction As New PdfSubmitAction("http://www.example.com/Submit.aspx")
submitAction.DataFormat = SubmitDataFormat.Html
'Sets the IncludeAnnotations to submit action
submitAction.IncludeAnnotations=True
submitButton.Actions.GotFocus = submitAction
'Save and close the PDF document
document.Save("Output.pdf")
document.Close(True)
See Also
IncludeIncrementalUpdates
Gets or sets a value indicating whether to submit form's incremental updates. Meaningful only when the form is being submitted in Forms Data Format. If set, the submitted FDF file includes the contents of all incremental updates to the underlying PDF document. If clear, the incremental updates are not included.
Declaration
public bool IncludeIncrementalUpdates { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Examples
//Create a PDF document
PdfDocument document = new PdfDocument();
//Add a new page
PdfPage page = document.Pages.Add();
// Create a Button field.
PdfButtonField submitButton = new PdfButtonField(page, "Submit data");
submitButton.Bounds = new RectangleF(100, 60, 50, 20);
submitButton.ToolTip = "Submit";
document.Form.Fields.Add(submitButton);
// Create a submit action. It submit the data of the form fields to the mentioned URL
PdfSubmitAction submitAction = new PdfSubmitAction("http://www.example.com/Submit.aspx");
submitAction.DataFormat = SubmitDataFormat.Html;
//Set the IncludeIncrementalUpdates to submit action
submitAction.IncludeIncrementalUpdates=true;
submitButton.Actions.GotFocus = submitAction;
//Save and close the PDF document
document.Save("Output.pdf");
document.Close(true);
'Create a PDF document
Dim document As New PdfDocument()
'Add a new page
Dim page As PdfPage = document.Pages.Add()
' Create a Button field.
Dim submitButton As New PdfButtonField(page, "Submit data")
submitButton.Bounds = New RectangleF(100, 60, 50, 20)
submitButton.ToolTip = "Submit"
document.Form.Fields.Add(submitButton)
' Create a submit action. It submit the data of the form fields to the mentioned URL
Dim submitAction As New PdfSubmitAction("http://www.example.com/Submit.aspx")
submitAction.DataFormat = SubmitDataFormat.Html
'Sets the IncludeIncrementalUpdates to submit action
submitAction.IncludeIncrementalUpdates=True
submitButton.Actions.GotFocus = submitAction
'Save and close the PDF document
document.Save("Output.pdf")
document.Close(True)
See Also
IncludeNoValueFields
Gets or sets a value indicating whether to submit fields without value. If set, all fields designated by the Fields collection and the Include flag are submitted, regardless of whether they have a value. For fields without a value, only the field name is transmitted.
Declaration
public bool IncludeNoValueFields { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Examples
//Create a PDF document
PdfDocument document = new PdfDocument();
//Add a new page
PdfPage page = document.Pages.Add();
// Create a Button field.
PdfButtonField submitButton = new PdfButtonField(page, "Submit data");
submitButton.Bounds = new RectangleF(100, 60, 50, 20);
submitButton.ToolTip = "Submit";
document.Form.Fields.Add(submitButton);
// Create a submit action. It submit the data of the form fields to the mentioned URL
PdfSubmitAction submitAction = new PdfSubmitAction("http://www.example.com/Submit.aspx");
submitAction.DataFormat = SubmitDataFormat.Html;
//Sets the IncludeNoValueFields to submit action
submitAction.IncludeNoValueFields=true;
submitButton.Actions.GotFocus = submitAction;
//Save and close the PDF document
document.Save("Output.pdf");
document.Close(true);
'Create a PDF document
Dim document As New PdfDocument()
'Add a new page
Dim page As PdfPage = document.Pages.Add()
' Create a Button field.
Dim submitButton As New PdfButtonField(page, "Submit data")
submitButton.Bounds = New RectangleF(100, 60, 50, 20)
submitButton.ToolTip = "Submit"
document.Form.Fields.Add(submitButton)
' Create a submit action. It submit the data of the form fields to the mentioned URL
Dim submitAction As New PdfSubmitAction("http://www.example.com/Submit.aspx")
submitAction.DataFormat = SubmitDataFormat.Html
'Sets the IncludeNoValueFields to submit action
submitAction.IncludeNoValueFields=true
submitButton.Actions.GotFocus = submitAction
'Save and close the PDF document
document.Save("Output.pdf")
document.Close(True)
See Also
SubmitCoordinates
Gets or sets a value indicating whether to submit mouse pointer coordinates. If set, the coordinates of the mouse click that caused the submit-form action are transmitted as part of the form data. The coordinate values are relative to the upper-left corner of the field�s widget annotation rectangle.
Declaration
public bool SubmitCoordinates { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Examples
//Create a PDF document
PdfDocument document = new PdfDocument();
//Add a new page
PdfPage page = document.Pages.Add();
// Create a Button field.
PdfButtonField submitButton = new PdfButtonField(page, "Submit data");
submitButton.Bounds = new RectangleF(100, 60, 50, 20);
submitButton.ToolTip = "Submit";
document.Form.Fields.Add(submitButton);
// Create a submit action. It submit the data of the form fields to the mentioned URL
PdfSubmitAction submitAction = new PdfSubmitAction("http://www.example.com/Submit.aspx");
submitAction.DataFormat = SubmitDataFormat.Html;
'Sets the SubmitCoordinates to submit action
submitAction.SubmitCoordinates=true;
submitButton.Actions.GotFocus = submitAction;
//Save and close the PDF document
document.Save("Output.pdf");
document.Close(true);
'Create a PDF document
Dim document As New PdfDocument()
'Add a new page
Dim page As PdfPage = document.Pages.Add()
' Create a Button field.
Dim submitButton As New PdfButtonField(page, "Submit data")
submitButton.Bounds = New RectangleF(100, 60, 50, 20)
submitButton.ToolTip = "Submit"
document.Form.Fields.Add(submitButton)
' Create a submit action. It submit the data of the form fields to the mentioned URL
Dim submitAction As New PdfSubmitAction("http://www.example.com/Submit.aspx")
submitAction.DataFormat = SubmitDataFormat.Html
'Sets the SubmitCoordinates to submit action
submitAction.SubmitCoordinates=True
submitButton.Actions.GotFocus = submitAction
'Save and close the PDF document
document.Save("Output.pdf")
document.Close(True)
See Also
Url
Gets an Url address where the data should be transferred.
Declaration
public string Url { get; }
Property Value
Type | Description |
---|---|
System.String | An string value specifying the full URI for the internet resource. |
Examples
//Create a PDF document
PdfDocument document = new PdfDocument();
//Add a new page
PdfPage page = document.Pages.Add();
// Create a Button field.
PdfButtonField submitButton = new PdfButtonField(page, "Submit data");
submitButton.Bounds = new RectangleF(100, 60, 50, 20);
submitButton.ToolTip = "Submit";
document.Form.Fields.Add(submitButton);
// Create a submit action. It submit the data of the form fields to the mentioned URL
PdfSubmitAction submitAction = new PdfSubmitAction(""http://www.example.com/Submit.aspx"");
submitAction.DataFormat = SubmitDataFormat.Html;
string url=submitAction.Url;
submitButton.Actions.GotFocus = submitAction;
//Save and close the PDF document
document.Save("Output.pdf");
document.Close(true);
'Create a PDF document
Dim document As New PdfDocument()
'Add a new page
Dim page As PdfPage = document.Pages.Add()
' Create a Button field.
Dim submitButton As New PdfButtonField(page, "Submit data")
submitButton.Bounds = New RectangleF(100, 60, 50, 20)
submitButton.ToolTip = "Submit"
document.Form.Fields.Add(submitButton)
' Create a submit action. It submit the data of the form fields to the mentioned URL
Dim submitAction As New PdfSubmitAction("http://www.example.com/Submit.aspx")
submitAction.DataFormat = SubmitDataFormat.Html
'Gets the url form the submit action
Dim url As String=submitAction.Url
submitButton.Actions.GotFocus = submitAction
'Save and close the PDF document
document.Save("Output.pdf")
document.Close(True)
See Also
Methods
Initialize()
Initializes instance.
Declaration
protected override void Initialize()