[]
Represents a PDF enumeration type.
public struct PdfEnum<TEnum> : IEquatable<PdfEnum<TEnum>> where TEnum : struct
Public Structure PdfEnum(Of TEnum As Structure)
Implements IEquatable(Of PdfEnum(Of TEnum))
Name | Description |
---|---|
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.
Name | Description |
---|---|
PdfEnum(PdfName) | Initializes a new instance of the PdfEnum<TEnum> struct
using a PdfName object.
The passed PdfName is converted to |
PdfEnum(string) | Initializes a new instance of the PdfEnum<TEnum> struct
using a string.
The passed string is converted to |
PdfEnum(TEnum) | Initializes a new instance of the PdfEnum<TEnum> struct
using a |
Name | Description |
---|---|
EnumValue | Gets the |
IsPdfValue | Gets a value indicating whether this PdfEnum<TEnum> struct contains a PDF value which cannot be converted to PdfEnum<TEnum>. |
IsString | Gets a value indicating whether this PdfEnum<TEnum> struct contains a string value which cannot be converted to PdfEnum<TEnum>. |
PdfValue | Gets the PDF value defined by this PdfEnum<TEnum>.
Throws an exception if this PdfEnum<TEnum> is represented by a parsed |
Name | Description |
---|---|
Equals(PdfEnum<TEnum>) | Checks whether this PdfEnum<TEnum> is equal to another PdfEnum<TEnum>. |
Equals(PdfEnum<TEnum>?, TEnum?) | Returns true if nullable PdfEnum<TEnum> equals to nullable |
Equals(object) | |
Equals(TEnum) | Checks whether this PdfEnum<TEnum> is equal to TEnum value. |
GetEnumValue(TEnum) | Returns the EnumValue if IsString is false, |
GetHashCode() | |
ToString() |
Name | Description |
---|---|
operator ==(PdfEnum<TEnum>, PdfEnum<TEnum>) | Equality operator. |
implicit operator TEnum(PdfEnum<TEnum>) | Converts a PdfEnum<TEnum> value to |
implicit operator PdfEnum<TEnum>(TEnum) | Converts a |
operator !=(PdfEnum<TEnum>, PdfEnum<TEnum>) | Inequality operator. |