[]
Represents a PDF enumeration type.
public struct PdfEnum<TEnum> : IEquatable<PdfEnum<TEnum>> where TEnum : struct
TEnumThe PDF Specification defines many properties with values represented by a limited set of predefined values. Such values are stored as PDF name objects, which is very similar to enumerations in C#.
But there are many PDF documents in which some of such properties have arbitrary custom values that are not defined in the PDF specification.
GcPdf uses this struct when processing such values.
Where possible, the value is converted to the underlying enumeration type TEnum,
otherwise the original string value is preserved.
Initializes a new instance of the PdfEnum<TEnum> struct
using a TEnum value.
public PdfEnum(TEnum value)
value TEnumThe TEnum value.
The PDF Specification defines many properties with values represented by a limited set of predefined values. Such values are stored as PDF name objects, which is very similar to enumerations in C#.
But there are many PDF documents in which some of such properties have arbitrary custom values that are not defined in the PDF specification.
GcPdf uses this struct when processing such values.
Where possible, the value is converted to the underlying enumeration type TEnum,
otherwise the original string value is preserved.
Initializes a new instance of the PdfEnum<TEnum> struct
using a PdfName object.
The passed PdfName is converted to TEnum if possible.
public PdfEnum(PdfName value)
value PdfNameThe string representing a TEnum value.
The PDF Specification defines many properties with values represented by a limited set of predefined values. Such values are stored as PDF name objects, which is very similar to enumerations in C#.
But there are many PDF documents in which some of such properties have arbitrary custom values that are not defined in the PDF specification.
GcPdf uses this struct when processing such values.
Where possible, the value is converted to the underlying enumeration type TEnum,
otherwise the original string value is preserved.
Initializes a new instance of the PdfEnum<TEnum> struct
using a string.
The passed string is converted to TEnum if possible.
public PdfEnum(string value)
value stringThe string representing a TEnum value.
The PDF Specification defines many properties with values represented by a limited set of predefined values. Such values are stored as PDF name objects, which is very similar to enumerations in C#.
But there are many PDF documents in which some of such properties have arbitrary custom values that are not defined in the PDF specification.
GcPdf uses this struct when processing such values.
Where possible, the value is converted to the underlying enumeration type TEnum,
otherwise the original string value is preserved.
Gets the TEnum value defined by this PdfEnum<TEnum>.
Throws an exception if this PdfEnum<TEnum> is represented by an unparsed PDF value.
public TEnum EnumValue { get; }
The PDF Specification defines many properties with values represented by a limited set of predefined values. Such values are stored as PDF name objects, which is very similar to enumerations in C#.
But there are many PDF documents in which some of such properties have arbitrary custom values that are not defined in the PDF specification.
GcPdf uses this struct when processing such values.
Where possible, the value is converted to the underlying enumeration type TEnum,
otherwise the original string value is preserved.
Gets a value indicating whether this PdfEnum<TEnum> struct contains a PDF value which cannot be converted to PdfEnum<TEnum>.
public bool IsPdfValue { get; }
The PDF Specification defines many properties with values represented by a limited set of predefined values. Such values are stored as PDF name objects, which is very similar to enumerations in C#.
But there are many PDF documents in which some of such properties have arbitrary custom values that are not defined in the PDF specification.
GcPdf uses this struct when processing such values.
Where possible, the value is converted to the underlying enumeration type TEnum,
otherwise the original string value is preserved.
Gets a value indicating whether this PdfEnum<TEnum> struct contains a string value which cannot be converted to PdfEnum<TEnum>.
[Obsolete("Use IsPdfValue")]
public bool IsString { get; }
The PDF Specification defines many properties with values represented by a limited set of predefined values. Such values are stored as PDF name objects, which is very similar to enumerations in C#.
But there are many PDF documents in which some of such properties have arbitrary custom values that are not defined in the PDF specification.
GcPdf uses this struct when processing such values.
Where possible, the value is converted to the underlying enumeration type TEnum,
otherwise the original string value is preserved.
Gets the PDF value defined by this PdfEnum<TEnum>.
Throws an exception if this PdfEnum<TEnum> is represented by a parsed TEnum value.
public PdfName PdfValue { get; }
The PDF Specification defines many properties with values represented by a limited set of predefined values. Such values are stored as PDF name objects, which is very similar to enumerations in C#.
But there are many PDF documents in which some of such properties have arbitrary custom values that are not defined in the PDF specification.
GcPdf uses this struct when processing such values.
Where possible, the value is converted to the underlying enumeration type TEnum,
otherwise the original string value is preserved.
Checks whether this PdfEnum<TEnum> is equal to TEnum value.
public bool Equals(TEnum other)
other TEnumThe TEnum value to compare to.
True if the values are equal, false otherwise.
The PDF Specification defines many properties with values represented by a limited set of predefined values. Such values are stored as PDF name objects, which is very similar to enumerations in C#.
But there are many PDF documents in which some of such properties have arbitrary custom values that are not defined in the PDF specification.
GcPdf uses this struct when processing such values.
Where possible, the value is converted to the underlying enumeration type TEnum,
otherwise the original string value is preserved.
Checks whether this PdfEnum<TEnum> is equal to another PdfEnum<TEnum>.
public bool Equals(PdfEnum<TEnum> other)
other PdfEnum<TEnum>The PdfEnum<TEnum> value to compare to.
True if the values are equal, false otherwise.
The PDF Specification defines many properties with values represented by a limited set of predefined values. Such values are stored as PDF name objects, which is very similar to enumerations in C#.
But there are many PDF documents in which some of such properties have arbitrary custom values that are not defined in the PDF specification.
GcPdf uses this struct when processing such values.
Where possible, the value is converted to the underlying enumeration type TEnum,
otherwise the original string value is preserved.
Returns true if nullable PdfEnum<TEnum> equals to nullable TEnum value.
public static bool Equals(PdfEnum<TEnum>? v1, TEnum? v2)
v1 PdfEnum<TEnum>?v2 TEnum?The PDF Specification defines many properties with values represented by a limited set of predefined values. Such values are stored as PDF name objects, which is very similar to enumerations in C#.
But there are many PDF documents in which some of such properties have arbitrary custom values that are not defined in the PDF specification.
GcPdf uses this struct when processing such values.
Where possible, the value is converted to the underlying enumeration type TEnum,
otherwise the original string value is preserved.
public override bool Equals(object obj)
obj objectThe PDF Specification defines many properties with values represented by a limited set of predefined values. Such values are stored as PDF name objects, which is very similar to enumerations in C#.
But there are many PDF documents in which some of such properties have arbitrary custom values that are not defined in the PDF specification.
GcPdf uses this struct when processing such values.
Where possible, the value is converted to the underlying enumeration type TEnum,
otherwise the original string value is preserved.
public TEnum GetEnumValue(TEnum defValue)
defValue TEnumThe default value if this PdfEnum<TEnum> has no enumeration value.
The PDF Specification defines many properties with values represented by a limited set of predefined values. Such values are stored as PDF name objects, which is very similar to enumerations in C#.
But there are many PDF documents in which some of such properties have arbitrary custom values that are not defined in the PDF specification.
GcPdf uses this struct when processing such values.
Where possible, the value is converted to the underlying enumeration type TEnum,
otherwise the original string value is preserved.
public override int GetHashCode()
The PDF Specification defines many properties with values represented by a limited set of predefined values. Such values are stored as PDF name objects, which is very similar to enumerations in C#.
But there are many PDF documents in which some of such properties have arbitrary custom values that are not defined in the PDF specification.
GcPdf uses this struct when processing such values.
Where possible, the value is converted to the underlying enumeration type TEnum,
otherwise the original string value is preserved.
public override string ToString()
The PDF Specification defines many properties with values represented by a limited set of predefined values. Such values are stored as PDF name objects, which is very similar to enumerations in C#.
But there are many PDF documents in which some of such properties have arbitrary custom values that are not defined in the PDF specification.
GcPdf uses this struct when processing such values.
Where possible, the value is converted to the underlying enumeration type TEnum,
otherwise the original string value is preserved.
Equality operator.
public static bool operator ==(PdfEnum<TEnum> v1, PdfEnum<TEnum> v2)
The PDF Specification defines many properties with values represented by a limited set of predefined values. Such values are stored as PDF name objects, which is very similar to enumerations in C#.
But there are many PDF documents in which some of such properties have arbitrary custom values that are not defined in the PDF specification.
GcPdf uses this struct when processing such values.
Where possible, the value is converted to the underlying enumeration type TEnum,
otherwise the original string value is preserved.
Converts a TEnum value to PdfEnum<TEnum>.
public static implicit operator PdfEnum<TEnum>(TEnum value)
value TEnumThe value to convert.
The PDF Specification defines many properties with values represented by a limited set of predefined values. Such values are stored as PDF name objects, which is very similar to enumerations in C#.
But there are many PDF documents in which some of such properties have arbitrary custom values that are not defined in the PDF specification.
GcPdf uses this struct when processing such values.
Where possible, the value is converted to the underlying enumeration type TEnum,
otherwise the original string value is preserved.
Converts a PdfEnum<TEnum> value to TEnum.
public static implicit operator TEnum(PdfEnum<TEnum> value)
value PdfEnum<TEnum>The value to convert.
The PDF Specification defines many properties with values represented by a limited set of predefined values. Such values are stored as PDF name objects, which is very similar to enumerations in C#.
But there are many PDF documents in which some of such properties have arbitrary custom values that are not defined in the PDF specification.
GcPdf uses this struct when processing such values.
Where possible, the value is converted to the underlying enumeration type TEnum,
otherwise the original string value is preserved.
Inequality operator.
public static bool operator !=(PdfEnum<TEnum> v1, PdfEnum<TEnum> v2)
The PDF Specification defines many properties with values represented by a limited set of predefined values. Such values are stored as PDF name objects, which is very similar to enumerations in C#.
But there are many PDF documents in which some of such properties have arbitrary custom values that are not defined in the PDF specification.
GcPdf uses this struct when processing such values.
Where possible, the value is converted to the underlying enumeration type TEnum,
otherwise the original string value is preserved.