Class PdfXfaDateTimeFormat
Represent the datetime field format
Inheritance
System.Object
PdfXfaDateTimeFormat
Namespace: Syncfusion.Pdf.Xfa
Assembly: Syncfusion.Pdf.Portable.dll
Syntax
public sealed class PdfXfaDateTimeFormat : Enum
Examples
//Create a new XFA document
PdfXfaDocument document = new PdfXfaDocument();
//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 format of the date time field.
field.Format = PdfXfaDateTimeFormat.Time;
//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 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 format of the date time field.
field.Format = PdfXfaDateTimeFormat.Time
'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
Date
Represents date only
Declaration
public const PdfXfaDateTimeFormat Date
Field Value
Type |
---|
PdfXfaDateTimeFormat |
DateTime
Represents date and times
Declaration
public const PdfXfaDateTimeFormat DateTime
Field Value
Type |
---|
PdfXfaDateTimeFormat |
Time
Represents time onluy
Declaration
public const PdfXfaDateTimeFormat Time
Field Value
Type |
---|
PdfXfaDateTimeFormat |