[]
Represents a PDF DateTime type.
public struct PdfDateTime : IEquatable<PdfDateTime>
The PDF Specification does not define a special type for DateTime values, such values are stored as strings in a special format, similar to (D:YYYYMMDDHHmmSSOHH'mm'), see the spec for details (PDF 1.7 chapter 3.8.3).
But there are many PDF documents in which DateTime strings are specified in some custom format, for example using a regional format. GcPdf uses this struct when processing such values. Where possible, the value is converted to System.DateTimeOffset, otherwise it preserves the original string value.
Initializes a new instance of the PdfDateTime struct using a IPdfString. The passed string is converted to System.DateTimeOffset if possible.
public PdfDateTime(IPdfString value)
value
IPdfStringThe IPdfString representing a date time value.
The PDF Specification does not define a special type for DateTime values, such values are stored as strings in a special format, similar to (D:YYYYMMDDHHmmSSOHH'mm'), see the spec for details (PDF 1.7 chapter 3.8.3).
But there are many PDF documents in which DateTime strings are specified in some custom format, for example using a regional format. GcPdf uses this struct when processing such values. Where possible, the value is converted to System.DateTimeOffset, otherwise it preserves the original string value.
Initializes a new instance of the PdfDateTime struct using a System.DateTime value.
public PdfDateTime(DateTime value)
value
System.DateTimeThe System.DateTime value.
The PDF Specification does not define a special type for DateTime values, such values are stored as strings in a special format, similar to (D:YYYYMMDDHHmmSSOHH'mm'), see the spec for details (PDF 1.7 chapter 3.8.3).
But there are many PDF documents in which DateTime strings are specified in some custom format, for example using a regional format. GcPdf uses this struct when processing such values. Where possible, the value is converted to System.DateTimeOffset, otherwise it preserves the original string value.
Initializes a new instance of the PdfDateTime struct using a string. The passed string is converted to System.DateTimeOffset if possible.
public PdfDateTime(string value)
value
stringThe string representing a date time value.
The PDF Specification does not define a special type for DateTime values, such values are stored as strings in a special format, similar to (D:YYYYMMDDHHmmSSOHH'mm'), see the spec for details (PDF 1.7 chapter 3.8.3).
But there are many PDF documents in which DateTime strings are specified in some custom format, for example using a regional format. GcPdf uses this struct when processing such values. Where possible, the value is converted to System.DateTimeOffset, otherwise it preserves the original string value.
Gets the System.DateTimeOffset value defined by this PdfDateTime. Throws an exception if this PdfDateTime is represented by an unparsed string.
public DateTimeOffset DateTimeOffset { get; }
The PDF Specification does not define a special type for DateTime values, such values are stored as strings in a special format, similar to (D:YYYYMMDDHHmmSSOHH'mm'), see the spec for details (PDF 1.7 chapter 3.8.3).
But there are many PDF documents in which DateTime strings are specified in some custom format, for example using a regional format. GcPdf uses this struct when processing such values. Where possible, the value is converted to System.DateTimeOffset, otherwise it preserves the original string value.
Gets the System.DateTime value representing local time. Throws an exception if this PdfDateTime is represented by an unparsed string.
public DateTime DateTimeValue { get; }
The PDF Specification does not define a special type for DateTime values, such values are stored as strings in a special format, similar to (D:YYYYMMDDHHmmSSOHH'mm'), see the spec for details (PDF 1.7 chapter 3.8.3).
But there are many PDF documents in which DateTime strings are specified in some custom format, for example using a regional format. GcPdf uses this struct when processing such values. Where possible, the value is converted to System.DateTimeOffset, otherwise it preserves the original string value.
Gets a value indicating whether this PdfDateTime struct contains a string value which cannot be converted to System.DateTime.
public bool IsString { get; }
The PDF Specification does not define a special type for DateTime values, such values are stored as strings in a special format, similar to (D:YYYYMMDDHHmmSSOHH'mm'), see the spec for details (PDF 1.7 chapter 3.8.3).
But there are many PDF documents in which DateTime strings are specified in some custom format, for example using a regional format. GcPdf uses this struct when processing such values. Where possible, the value is converted to System.DateTimeOffset, otherwise it preserves the original string value.
Gets the IPdfString representing the value of this PdfDateTime.
public IPdfString Value { get; }
The PDF Specification does not define a special type for DateTime values, such values are stored as strings in a special format, similar to (D:YYYYMMDDHHmmSSOHH'mm'), see the spec for details (PDF 1.7 chapter 3.8.3).
But there are many PDF documents in which DateTime strings are specified in some custom format, for example using a regional format. GcPdf uses this struct when processing such values. Where possible, the value is converted to System.DateTimeOffset, otherwise it preserves the original string value.
Converts a System.DateTime value to a string in PDF format as described in PDF 1.7 specification chapter 3.8.3.
public static string DateTimeToPdfString(DateTime value)
value
System.DateTimeThe System.DateTime value.
Returns string with formatted datetime.
The PDF Specification does not define a special type for DateTime values, such values are stored as strings in a special format, similar to (D:YYYYMMDDHHmmSSOHH'mm'), see the spec for details (PDF 1.7 chapter 3.8.3).
But there are many PDF documents in which DateTime strings are specified in some custom format, for example using a regional format. GcPdf uses this struct when processing such values. Where possible, the value is converted to System.DateTimeOffset, otherwise it preserves the original string value.
Converts a System.DateTimeOffset value to a string in PDF format as described in PDF 1.7 specification chapter 3.8.3.
public static string DateTimeToPdfString(DateTimeOffset value)
value
System.DateTimeOffsetThe System.DateTime value.
Returns string with formatted datetime.
The PDF Specification does not define a special type for DateTime values, such values are stored as strings in a special format, similar to (D:YYYYMMDDHHmmSSOHH'mm'), see the spec for details (PDF 1.7 chapter 3.8.3).
But there are many PDF documents in which DateTime strings are specified in some custom format, for example using a regional format. GcPdf uses this struct when processing such values. Where possible, the value is converted to System.DateTimeOffset, otherwise it preserves the original string value.
Checks whether this PdfDateTime is equal to another PdfDateTime.
public bool Equals(PdfDateTime other)
other
PdfDateTimeThe PdfDateTime value to compare to.
True if values are equal, false otherwise.
The PDF Specification does not define a special type for DateTime values, such values are stored as strings in a special format, similar to (D:YYYYMMDDHHmmSSOHH'mm'), see the spec for details (PDF 1.7 chapter 3.8.3).
But there are many PDF documents in which DateTime strings are specified in some custom format, for example using a regional format. GcPdf uses this struct when processing such values. Where possible, the value is converted to System.DateTimeOffset, otherwise it preserves the original string value.
public override bool Equals(object obj)
obj
objectThe PDF Specification does not define a special type for DateTime values, such values are stored as strings in a special format, similar to (D:YYYYMMDDHHmmSSOHH'mm'), see the spec for details (PDF 1.7 chapter 3.8.3).
But there are many PDF documents in which DateTime strings are specified in some custom format, for example using a regional format. GcPdf uses this struct when processing such values. Where possible, the value is converted to System.DateTimeOffset, otherwise it preserves the original string value.
public override int GetHashCode()
The PDF Specification does not define a special type for DateTime values, such values are stored as strings in a special format, similar to (D:YYYYMMDDHHmmSSOHH'mm'), see the spec for details (PDF 1.7 chapter 3.8.3).
But there are many PDF documents in which DateTime strings are specified in some custom format, for example using a regional format. GcPdf uses this struct when processing such values. Where possible, the value is converted to System.DateTimeOffset, otherwise it preserves the original string value.
public override string ToString()
The PDF Specification does not define a special type for DateTime values, such values are stored as strings in a special format, similar to (D:YYYYMMDDHHmmSSOHH'mm'), see the spec for details (PDF 1.7 chapter 3.8.3).
But there are many PDF documents in which DateTime strings are specified in some custom format, for example using a regional format. GcPdf uses this struct when processing such values. Where possible, the value is converted to System.DateTimeOffset, otherwise it preserves the original string value.
Converts this PdfDateTime to string, using a specified format if the current struct holds a DateTime value.
public string ToString(string dateTimeFormat)
dateTimeFormat
stringThe date time format.
The PDF Specification does not define a special type for DateTime values, such values are stored as strings in a special format, similar to (D:YYYYMMDDHHmmSSOHH'mm'), see the spec for details (PDF 1.7 chapter 3.8.3).
But there are many PDF documents in which DateTime strings are specified in some custom format, for example using a regional format. GcPdf uses this struct when processing such values. Where possible, the value is converted to System.DateTimeOffset, otherwise it preserves the original string value.
Tries to convert a string to System.DateTimeOffset. See PDF 1.7 specification chapter 3.8.3.
public static bool TryParse(string s, out DateTimeOffset value)
s
stringThe string in the format D:YYYYMMDDHHmmSSOHH'mm'.
value
System.DateTimeOffsetOUT: The parsed System.DateTimeOffset value.
True if conversion succeed, false otherwise.
The PDF Specification does not define a special type for DateTime values, such values are stored as strings in a special format, similar to (D:YYYYMMDDHHmmSSOHH'mm'), see the spec for details (PDF 1.7 chapter 3.8.3).
But there are many PDF documents in which DateTime strings are specified in some custom format, for example using a regional format. GcPdf uses this struct when processing such values. Where possible, the value is converted to System.DateTimeOffset, otherwise it preserves the original string value.
The equality operator.
public static bool operator ==(PdfDateTime v1, PdfDateTime v2)
v1
PdfDateTimev2
PdfDateTimeThe PDF Specification does not define a special type for DateTime values, such values are stored as strings in a special format, similar to (D:YYYYMMDDHHmmSSOHH'mm'), see the spec for details (PDF 1.7 chapter 3.8.3).
But there are many PDF documents in which DateTime strings are specified in some custom format, for example using a regional format. GcPdf uses this struct when processing such values. Where possible, the value is converted to System.DateTimeOffset, otherwise it preserves the original string value.
Converts a System.DateTime value to PdfDateTime.
public static implicit operator PdfDateTime(DateTime value)
value
System.DateTimeThe PDF Specification does not define a special type for DateTime values, such values are stored as strings in a special format, similar to (D:YYYYMMDDHHmmSSOHH'mm'), see the spec for details (PDF 1.7 chapter 3.8.3).
But there are many PDF documents in which DateTime strings are specified in some custom format, for example using a regional format. GcPdf uses this struct when processing such values. Where possible, the value is converted to System.DateTimeOffset, otherwise it preserves the original string value.
The inequality operator.
public static bool operator !=(PdfDateTime v1, PdfDateTime v2)
v1
PdfDateTimev2
PdfDateTimeThe PDF Specification does not define a special type for DateTime values, such values are stored as strings in a special format, similar to (D:YYYYMMDDHHmmSSOHH'mm'), see the spec for details (PDF 1.7 chapter 3.8.3).
But there are many PDF documents in which DateTime strings are specified in some custom format, for example using a regional format. GcPdf uses this struct when processing such values. Where possible, the value is converted to System.DateTimeOffset, otherwise it preserves the original string value.