[]
Represents a PDF Name object. Technically a PDF name is an immutable array of bytes. This class overrides and implements:
public class PdfName : IPdfName, IReadOnlyList<byte>, IReadOnlyCollection<byte>, IEnumerable<byte>, IEnumerable, IEquatable<PdfName>
Initializes a new instance of the PdfName class.
public PdfName(byte[] value, int offset, int length)
value byte[]The byte array.
offset intThe offset in the value.
length intThe length of the name.
Initializes a new instance of the PdfName class.
public PdfName(byte[] value)
value byte[]The value
Initializes a new instance of the PdfName class.
public PdfName(string value)
value stringThe value.
Gets the empty array of PdfName objects.
public static readonly PdfName[] s_EmptyPdfNameArray
Gets the number of elements contained in the PdfString.
public int Count { get; }
Gets or sets the byte at the specified index.
public byte this[int index] { get; }
index intThe zero-based index of the byte to get or set.
The byte at the specified index.
Determines whether a byte is in the PdfString.
public bool Contains(byte item)
item byteThe byte to locate in the PdfString.
true if byte is found in the PdfString; otherwise, false.
Copies the entire PdfString to a compatible one-dimensional array, starting at the specified index of the target array.
public void CopyTo(byte[] array, int arrayIndex)
array byte[]The one-dimensional Array that is the destination of the bytes copied from PdfString. The Array must have zero-based indexing.
arrayIndex intThe zero-based index in array at which copying begins.
Checks whether this PdfName equals to value.
public virtual bool Equals(PdfName value)
value PdfNamepublic override bool Equals(object obj)
obj objectpublic override int GetHashCode()
Creates a new PdfName or returns existing predefined Standard Name.
public static PdfName GetOrCreate(byte[] bytes, int length)
bytes byte[]length intCreates a new PdfName or returns existing predefined Standard Name.
public static PdfName GetOrCreate(byte[] bytes)
bytes byte[]Creates a new PdfName or returns existing predefined Standard Name.
public static PdfName GetOrCreate(string str)
str stringReturns true if value is null or empty (zero length).
public static bool IsNullOrEmpty(PdfName value)
value PdfNameChecks whether the specified byte is valid and can be written to the PDF stream without '#' prefix.
public static bool IsValidChar(byte c)
c bytepublic override string ToString()
The equality operator.
public static bool operator ==(PdfName v1, PdfName v2)
The inequality operator.
public static bool operator !=(PdfName v1, PdfName v2)