Class PdfXfaPageSettings
Represents the XFA page settings.
Inheritance
System.Object
PdfXfaPageSettings
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Syncfusion.Pdf.Xfa
Assembly: Syncfusion.Pdf.Base.dll
Syntax
public class PdfXfaPageSettings
Examples
//Create a new XFA document
PdfXfaDocument document = new PdfXfaDocument();
//Create a new PDF XFA page settings instance.
PdfXfaPageSettings settings = new PdfXfaPageSettings();
//Set margin.
settings.Margins.All = 40;
//Set page orientation.
settings.PageOrientation = PdfXfaPageOrientation.Landscape;
//Set page size.
settings.PageSize = new SizeF(new SizeF(500, 700));
//Set page settings to document.
document.PageSettings = settings;
//Create a new XFA form
PdfXfaForm form = new PdfXfaForm(PdfXfaFlowDirection.Horizontal, 595);
//Create a new XFA Field
PdfXfaDateTimeField field = new PdfXfaDateTimeField("dateTime1", new SizeF(100, 30));
//Set the default value
field.Value = DateTime.Now;
//Add the field to the form
form.Fields.Add(field);
document.XfaForm = form;
//Save the document
document.Save("output.pdf", PdfXfaType.Dynamic);
//Close the document
document.Close();
'Create a new XFA document
Dim document As New PdfXfaDocument()
'Create a new PDF XFA page settings instance.
Dim settings As New PdfXfaPageSettings()
'Set margin.
settings.Margins.All = 40
'Set page orientation.
settings.PageOrientation = PdfXfaPageOrientation.Landscape
'Set page size.
settings.PageSize = New SizeF(New SizeF(500, 700))
'Set page settings to document.
document.PageSettings = settings
'Create a new XFA form
Dim form As New PdfXfaForm(PdfXfaFlowDirection.Horizontal, 595)
'Create a new XFA Field
Dim field As New PdfXfaDateTimeField("dateTime1", New SizeF(100, 30))
'Set the default value
field.Value = DateTime.Now
'Add the field to the form
form.Fields.Add(field)
document.XfaForm = form
'Save the document
document.Save("output.pdf", PdfXfaType.Dynamic)
'Close the document
document.Close()
Constructors
PdfXfaPageSettings()
Declaration
public PdfXfaPageSettings()
Properties
Margins
Gets or set margins.
Declaration
public PdfMargins Margins { get; set; }
Property Value
Type | Description |
---|---|
PdfMargins |
Examples
//Create a new XFA document
PdfXfaDocument document = new PdfXfaDocument();
//Create a new PDF XFA page settings instance.
PdfXfaPageSettings settings = new PdfXfaPageSettings();
//Set margin.
settings.Margins.All = 40;
//Set page orientation.
settings.PageOrientation = PdfXfaPageOrientation.Landscape;
//Set page size.
settings.PageSize = new SizeF(new SizeF(500, 700));
//Set page settings to document.
document.PageSettings = settings;
//Create a new XFA form
PdfXfaForm form = new PdfXfaForm(PdfXfaFlowDirection.Horizontal, 595);
//Create a new XFA Field
PdfXfaDateTimeField field = new PdfXfaDateTimeField("dateTime1", new SizeF(100, 30));
//Set the default value
field.Value = DateTime.Now;
//Add the field to the form
form.Fields.Add(field);
document.XfaForm = form;
//Save the document
document.Save("output.pdf", PdfXfaType.Dynamic);
//Close the document
document.Close();
'Create a new XFA document
Dim document As New PdfXfaDocument()
'Create a new PDF XFA page settings instance.
Dim settings As New PdfXfaPageSettings()
'Set margin.
settings.Margins.All = 40
'Set page orientation.
settings.PageOrientation = PdfXfaPageOrientation.Landscape
'Set page size.
settings.PageSize = New SizeF(New SizeF(500, 700))
'Set page settings to document.
document.PageSettings = settings
'Create a new XFA form
Dim form As New PdfXfaForm(PdfXfaFlowDirection.Horizontal, 595)
'Create a new XFA Field
Dim field As New PdfXfaDateTimeField("dateTime1", New SizeF(100, 30))
'Set the default value
field.Value = DateTime.Now
'Add the field to the form
form.Fields.Add(field)
document.XfaForm = form
'Save the document
document.Save("output.pdf", PdfXfaType.Dynamic)
'Close the document
document.Close()
PageOrientation
Gets or sets the XFA page orientation
Declaration
public PdfXfaPageOrientation PageOrientation { get; set; }
Property Value
Type | Description |
---|---|
PdfXfaPageOrientation |
Examples
//Create a new XFA document
PdfXfaDocument document = new PdfXfaDocument();
//Create a new PDF XFA page settings instance.
PdfXfaPageSettings settings = new PdfXfaPageSettings();
//Set margin.
settings.Margins.All = 40;
//Set page orientation.
settings.PageOrientation = PdfXfaPageOrientation.Landscape;
//Set page size.
settings.PageSize = new SizeF(new SizeF(500, 700));
//Set page settings to document.
document.PageSettings = settings;
//Create a new XFA form
PdfXfaForm form = new PdfXfaForm(PdfXfaFlowDirection.Horizontal, 595);
//Create a new XFA Field
PdfXfaDateTimeField field = new PdfXfaDateTimeField("dateTime1", new SizeF(100, 30));
//Set the default value
field.Value = DateTime.Now;
//Add the field to the form
form.Fields.Add(field);
document.XfaForm = form;
//Save the document
document.Save("output.pdf", PdfXfaType.Dynamic);
//Close the document
document.Close();
'Create a new XFA document
Dim document As New PdfXfaDocument()
'Create a new PDF XFA page settings instance.
Dim settings As New PdfXfaPageSettings()
'Set margin.
settings.Margins.All = 40
'Set page orientation.
settings.PageOrientation = PdfXfaPageOrientation.Landscape
'Set page size.
settings.PageSize = New SizeF(New SizeF(500, 700))
'Set page settings to document.
document.PageSettings = settings
'Create a new XFA form
Dim form As New PdfXfaForm(PdfXfaFlowDirection.Horizontal, 595)
'Create a new XFA Field
Dim field As New PdfXfaDateTimeField("dateTime1", New SizeF(100, 30))
'Set the default value
field.Value = DateTime.Now
'Add the field to the form
form.Fields.Add(field)
document.XfaForm = form
'Save the document
document.Save("output.pdf", PdfXfaType.Dynamic)
'Close the document
document.Close()
PageSize
Gets or sets the XFA page size
Declaration
public SizeF PageSize { get; set; }
Property Value
Type | Description |
---|---|
System.Drawing.SizeF |
Examples
//Create a new XFA document
PdfXfaDocument document = new PdfXfaDocument();
//Create a new PDF XFA page settings instance.
PdfXfaPageSettings settings = new PdfXfaPageSettings();
//Set margin.
settings.Margins.All = 40;
//Set page orientation.
settings.PageOrientation = PdfXfaPageOrientation.Landscape;
//Set page size.
settings.PageSize = new SizeF(new SizeF(500, 700));
//Set page settings to document.
document.PageSettings = settings;
//Create a new XFA form
PdfXfaForm form = new PdfXfaForm(PdfXfaFlowDirection.Horizontal, 595);
//Create a new XFA Field
PdfXfaDateTimeField field = new PdfXfaDateTimeField("dateTime1", new SizeF(100, 30));
//Set the default value
field.Value = DateTime.Now;
//Add the field to the form
form.Fields.Add(field);
document.XfaForm = form;
//Save the document
document.Save("output.pdf", PdfXfaType.Dynamic);
//Close the document
document.Close();
'Create a new XFA document
Dim document As New PdfXfaDocument()
'Create a new PDF XFA page settings instance.
Dim settings As New PdfXfaPageSettings()
'Set margin.
settings.Margins.All = 40
'Set page orientation.
settings.PageOrientation = PdfXfaPageOrientation.Landscape
'Set page size.
settings.PageSize = New SizeF(New SizeF(500, 700))
'Set page settings to document.
document.PageSettings = settings
'Create a new XFA form
Dim form As New PdfXfaForm(PdfXfaFlowDirection.Horizontal, 595)
'Create a new XFA Field
Dim field As New PdfXfaDateTimeField("dateTime1", New SizeF(100, 30))
'Set the default value
field.Value = DateTime.Now
'Add the field to the form
form.Fields.Add(field)
document.XfaForm = form
'Save the document
document.Save("output.pdf", PdfXfaType.Dynamic)
'Close the document
document.Close()