Enum PdfXfaPageOrientation
Enumerator that implements XFA page orientations.
Namespace: Syncfusion.Pdf.Xfa
Assembly: Syncfusion.Pdf.Base.dll
Syntax
public enum 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()
Fields
Name | Description |
---|---|
Landscape | Landscape orientation. |
Portrait | Portrait orientation. |