Class PdfXfaPageOrientation
Enumerator that implements XFA page orientations.
Inheritance
System.Object
PdfXfaPageOrientation
Namespace: Syncfusion.Pdf.Xfa
Assembly: Syncfusion.Pdf.UWP.dll
Syntax
public sealed class PdfXfaPageOrientation : Enum
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
Landscape
Landscape orientation.
Declaration
public const PdfXfaPageOrientation Landscape
Field Value
Type |
---|
PdfXfaPageOrientation |
Portrait
Portrait orientation.
Declaration
public const PdfXfaPageOrientation Portrait
Field Value
Type |
---|
PdfXfaPageOrientation |