[]
        
(Showing Draft Content)

GrapeCity.Documents.Pdf.Spec.PdfName

Class PdfName

Namespace
GrapeCity.Documents.Pdf.Spec
Assembly
GcDocs.Pdf.dll

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>
Inheritance
object
PdfName
Implements
System.Collections.Generic.IReadOnlyList<T><byte>
System.Collections.Generic.IReadOnlyCollection<T><byte>
System.Collections.Generic.IEnumerable<T><byte>
System.Collections.IEnumerable
System.IEquatable<T><PdfName>
Inherited Members
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetType()
object.MemberwiseClone()
Extension Methods

Constructors

PdfName(byte[], int, int)

Initializes a new instance of the PdfName class.

public PdfName(byte[] value, int offset, int length)

Parameters

value byte[]

The byte array.

offset int

The offset in the value.

length int

The length of the name.

PdfName(byte[])

Initializes a new instance of the PdfName class.

public PdfName(byte[] value)

Parameters

value byte[]

The value

PdfName(string)

Initializes a new instance of the PdfName class.

public PdfName(string value)

Parameters

value string

The value.

Fields

s_EmptyPdfNameArray

Gets the empty array of PdfName objects.

public static readonly PdfName[] s_EmptyPdfNameArray

Field Value

PdfName[]

Properties

Count

Gets the number of elements contained in the PdfString.

public int Count { get; }

Property Value

int

this[int]

Gets or sets the byte at the specified index.

public byte this[int index] { get; }

Parameters

index int

The zero-based index of the byte to get or set.

Property Value

byte

The byte at the specified index.

Methods

AreAllPdfNamesUnique(IList<PdfName>)

Checks whether all PdfName objects are unique.

public static bool AreAllPdfNamesUnique(IList<PdfName> names)

Parameters

names System.Collections.Generic.IList<T><PdfName>

Returns

bool

Contains(byte)

Determines whether a byte is in the PdfString.

public bool Contains(byte item)

Parameters

item byte

The byte to locate in the PdfString.

Returns

bool

true if byte is found in the PdfString; otherwise, false.

CopyTo(byte[], int)

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)

Parameters

array byte[]

The one-dimensional Array that is the destination of the bytes copied from PdfString. The Array must have zero-based indexing.

arrayIndex int

The zero-based index in array at which copying begins.

Equals(PdfName)

Checks whether this PdfName equals to value.

public virtual bool Equals(PdfName value)

Parameters

value PdfName

Returns

bool

Equals(object)

public override bool Equals(object obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

GetOrCreate(byte[], int)

Creates a new PdfName or returns existing predefined Standard Name.

public static PdfName GetOrCreate(byte[] bytes, int length)

Parameters

bytes byte[]
length int

Returns

PdfName

GetOrCreate(byte[])

Creates a new PdfName or returns existing predefined Standard Name.

public static PdfName GetOrCreate(byte[] bytes)

Parameters

bytes byte[]

Returns

PdfName

GetOrCreate(string)

Creates a new PdfName or returns existing predefined Standard Name.

public static PdfName GetOrCreate(string str)

Parameters

str string

Returns

PdfName

IsNullOrEmpty(PdfName)

Returns true if value is null or empty (zero length).

public static bool IsNullOrEmpty(PdfName value)

Parameters

value PdfName

Returns

bool

IsValidChar(byte)

Checks whether the specified byte is valid and can be written to the PDF stream without '#' prefix.

public static bool IsValidChar(byte c)

Parameters

c byte

Returns

bool

ToString()

public override string ToString()

Returns

string

Operators

operator ==(PdfName, PdfName)

The equality operator.

public static bool operator ==(PdfName v1, PdfName v2)

Parameters

v1 PdfName
v2 PdfName

Returns

bool

operator !=(PdfName, PdfName)

The inequality operator.

public static bool operator !=(PdfName v1, PdfName v2)

Parameters

v1 PdfName
v2 PdfName

Returns

bool