Class PdfXfaPage
Represents the PDF Xfa page.
Inheritance
System.Object
PdfXfaPage
Namespace: Syncfusion.Pdf.Xfa
Assembly: Syncfusion.Pdf.NET.dll
Syntax
public class PdfXfaPage : Object
Examples
//Create a new PDF XFA document.
PdfXfaDocument document = new PdfXfaDocument();
//Add a new XFA page.
PdfXfaPage xfaPage = document.Pages.Add();
//Create a new PDF XFA form
PdfXfaForm mainForm = new PdfXfaForm("subform1", xfaPage, xfaPage.GetClientSize().Width);
//Create a numeric field and add the properties.
PdfXfaNumericField numericField = new PdfXfaNumericField("numericField", new SizeF(200, 20));
//Set the caption text.
numericField.Caption.Text = "Numeric Field";
//Add the field to the XFA form.
mainForm.Fields.Add(numericField);
//Add the XFA form to the document.
document.XfaForm = mainForm;
//Save the document.
document.Save("output.pdf", PdfXfaType.Dynamic);
//close the document
document.Close();
'Create a new PDF XFA document.
Dim document As New PdfXfaDocument()
'Add a new XFA page.
Dim xfaPage As PdfXfaPage = document.Pages.Add()
'Create a new PDF XFA form
Dim mainForm As New PdfXfaForm("subform1", xfaPage, xfaPage.GetClientSize().Width)
'Create a numeric field and add the properties.
Dim numericField As New PdfXfaNumericField("numericField", New SizeF(200,20))
'Set the caption text.
numericField.Caption.Text = "Numeric Field"
'Add the field to the XFA form.
mainForm.Fields.Add(numericField)
'Add the XFA form to the document.
document.XfaForm = mainForm
'Save the document.
document.Save("output.pdf",PdfXfaType.Dynamic)
'close the document
document.Close()
Constructors
PdfXfaPage()
Initialized the new instance of the PdfXfaPage class.
Declaration
public PdfXfaPage()
Examples
//Create a new PDF XFA document.
PdfXfaDocument document = new PdfXfaDocument();
//Add a new XFA page.
PdfXfaPage xfaPage = document.Pages.Add();
//Create a new PDF XFA form
PdfXfaForm mainForm = new PdfXfaForm("subform1", xfaPage, xfaPage.GetClientSize().Width);
//Create a numeric field and add the properties.
PdfXfaNumericField numericField = new PdfXfaNumericField("numericField", new SizeF(200, 20));
//Set the caption text.
numericField.Caption.Text = "Numeric Field";
//Add the field to the XFA form.
mainForm.Fields.Add(numericField);
//Add the XFA form to the document.
document.XfaForm = mainForm;
//Save the document.
document.Save("output.pdf", PdfXfaType.Dynamic);
//close the document
document.Close();
'Create a new PDF XFA document.
Dim document As New PdfXfaDocument()
'Add a new XFA page.
Dim xfaPage As PdfXfaPage = document.Pages.Add()
'Create a new PDF XFA form
Dim mainForm As New PdfXfaForm("subform1", xfaPage, xfaPage.GetClientSize().Width)
'Create a numeric field and add the properties.
Dim numericField As New PdfXfaNumericField("numericField", New SizeF(200,20))
'Set the caption text.
numericField.Caption.Text = "Numeric Field"
'Add the field to the XFA form.
mainForm.Fields.Add(numericField)
'Add the XFA form to the document.
document.XfaForm = mainForm
'Save the document.
document.Save("output.pdf",PdfXfaType.Dynamic)
'close the document
document.Close()
Methods
GetClientSize()
Get the content area
Declaration
public SizeF GetClientSize()
Returns
Type | Description |
---|---|
SizeF | Returns the client size of the page. |
Examples
//Create a new PDF XFA document.
PdfXfaDocument document = new PdfXfaDocument();
//Add a new XFA page.
PdfXfaPage xfaPage = document.Pages.Add();
//Create a new PDF XFA form
PdfXfaForm mainForm = new PdfXfaForm("subform1", xfaPage, xfaPage.GetClientSize().Width);
//Create a numeric field and add the properties.
PdfXfaNumericField numericField = new PdfXfaNumericField("numericField", new SizeF(200, 20));
//Set the caption text.
numericField.Caption.Text = "Numeric Field";
//Add the field to the XFA form.
mainForm.Fields.Add(numericField);
//Add the XFA form to the document.
document.XfaForm = mainForm;
//Save the document.
document.Save("output.pdf", PdfXfaType.Dynamic);
//close the document
document.Close();
'Create a new PDF XFA document.
Dim document As New PdfXfaDocument()
'Add a new XFA page.
Dim xfaPage As PdfXfaPage = document.Pages.Add()
'Create a new PDF XFA form
Dim mainForm As New PdfXfaForm("subform1", xfaPage, xfaPage.GetClientSize().Width)
'Create a numeric field and add the properties.
Dim numericField As New PdfXfaNumericField("numericField", New SizeF(200,20))
'Set the caption text.
numericField.Caption.Text = "Numeric Field"
'Add the field to the XFA form.
mainForm.Fields.Add(numericField)
'Add the XFA form to the document.
document.XfaForm = mainForm
'Save the document.
document.Save("output.pdf",PdfXfaType.Dynamic)
'close the document
document.Close()