cete.dynamicpdf.importformdataaction
ImportFormDataAction
- Namespace: ceTe.DynamicPDF
- Assemblies: ceTe.DynamicPDF.40.dll
Represents an import form data action.
public class ImportFormDataAction : OutlineAnnotationAction
Public Class ImportFormDataAction
Inherits OutlineAnnotationAction
Inheritance: Object → Action → OutlineAnnotationAction → ImportFormDataAction
Licensing
This class is a DynamicPDF Generator Enterprise Edition feature. One of the following licenses is required for non-evaluation usage:
- DynamicPDF Generator for .NET Enterprise Edition
- DynamicPDF Merger for .NET Enterprise Edition
- DynamicPDF ReportWriter for .NET Enterprise Edition
- DynamicPDF Core Suite for .NET Enterprise Edition
Examples
The following example shows how to use import form data action.
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements.Forms
Imports ceTe.DynamicPDF.PageElements
Module MyModule
Sub Main()
' Create a PDF Document
Dim MyDocument As Document = New Document()
' Create a page and add it to the document
Dim MyPage As Page = New Page()
MyDocument.Pages.Add(MyPage)
Dim MyButton As Button = New Button("btn", 50, 150, 100, 30)
MyButton.Label = "Click Here"
' Create label and text field
Dim MyLabel As Label = New Label("Click the button to fill the text field using import data action: ", 50, 100, 250, 30)
Dim Myfield As ceTe.DynamicPDF.PageElements.Forms.TextField = New ceTe.DynamicPDF.PageElements.Forms.TextField("Text1", 320, 100, 100, 30)
' Add the label and form fields to the page
MyPage.Elements.Add(MyButton)
MyPage.Elements.Add(Myfield)
MyPage.Elements.Add(MyLabel)
' Create a import form data action and assign to the button events.
Dim MyAction As ImportFormDataAction = New ImportFormDataAction("FdfFilePath")
MyButton.ReaderEvents.MouseUp = MyAction
' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements.Forms;
using ceTe.DynamicPDF.PageElements;
class MyClass
{
static void Main(string[] args)
{
// Create a PDF Document
Document document = new Document();
// Create a page and add it to the document
Page page = new Page();
document.Pages.Add(page);
Button button = new Button("btn", 50, 150, 100, 30);
button.Label = "Click Here";
// Create label and text field
Label label1 = new Label("Click the button to fill the text field using import data action: ", 50, 100, 250, 30);
ceTe.DynamicPDF.PageElements.Forms.TextField field = new ceTe.DynamicPDF.PageElements.Forms.TextField("Text1", 320, 100, 100, 30);
// Add the label and form fields to the page
page.Elements.Add(button);
page.Elements.Add(field);
page.Elements.Add(label1);
// Create a import form data action and assign to the button events.
ImportFormDataAction action = new ImportFormDataAction(@"FdfFilePath");
button.ReaderEvents.MouseUp = action;
// Save the PDF
document.Draw(@"c:\MyDocument.pdf");
}
}
Constructors
ImportFormDataAction()
Initializes a new instance of the import form data action class.
public ImportFormDataAction()
Public Sub New ()
ImportFormDataAction(String)
Initializes a new instance of the import form data action class.
public ImportFormDataAction(string filePath)
Public Sub New (filePath As String)
Parameters
- filePath: String
Path of the FDF file.
Properties
NextAction
Gets or sets next action for the current action. (Inherited from OutlineAnnotationAction)
public OutlineAnnotationAction NextAction { get; set; }
Public Property NextAction As OutlineAnnotationAction
Property Value
Methods
Draw(DocumentWriter)
Draws the action to the specified DocumentWriter object.
public void Draw(DocumentWriter writer)
Sub Draw(writer As DocumentWriter)
Parameters
- writer: DocumentWriter
The DocumentWriter object to receive the actions output.
Equals(Object)
Determines whether the specified Object is equal to the current Object . (Inherited from Object)
public bool Equals(Object obj)
Function Equals(obj As Object) As Boolean
Parameters
- obj: Object
The Object to compare with the current Object .
Returns
true if the specified Object is equal to the current Object ; otherwise, false.
GetHashCode()
Serves as a hash function for a particular type. (Inherited from Object)
public int GetHashCode()
Function GetHashCode() As Integer
Returns
A hash code for the current Object .
GetType()
Gets the Type of the current instance. (Inherited from Object)
public Type GetType()
Function GetType() As Type
Returns
The Type instance that represents the exact runtime type of the current instance.
ToString()
Returns a String that represents the current Object . (Inherited from Object)
public string ToString()
Function ToString() As String
Returns
A String that represents the current Object .