Enum PdfXfaTimePattern
- Namespace
- Syncfusion.Pdf.Xfa
- Assembly
- Syncfusion.Pdf.Portable.dll
Represents the time patterns
public enum PdfXfaTimePattern
Fields
Default = 0
default value (eg: 10:43:01 AM)
Full = 4
full (eg: 10:43:01 AM GMT+05:30)
HH_MM_SS = 10
eg:13:30:30
HH_MM_SS_A = 8
eg:01:30:30 PM
H_MM_A = 5
eg:1:30 PM
H_MM_SS = 9
eg:13:30:30
H_MM_SS_A = 6
eg:1:30:30 PM
H_MM_SS_A_Z = 7
eg:1:30:43 PM GMT+05:30
Long = 3
Long (eg: 10:43:01 AM GMT+05:30)
Medium = 2
Medium (eg: 10:43:01 AM)
Short = 1
short(eg: 10:43 AM)
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 time pattern.
field.TimePattern = PdfXfaTimePattern.Long;
//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 time pattern.
field.TimePattern = PdfXfaTimePattern.Long
'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()