Table of Contents

Class PdfName

Namespace
PdfSharp.Pdf
Assembly
PdfSharp.dll

Represents a PDF name value.

public sealed class PdfName : PdfItem, ICloneable
Inheritance
PdfName
Implements
Inherited Members

Constructors

PdfName()

Initializes a new instance of the PdfName class.

public PdfName()

PdfName(string)

Initializes a new instance of the PdfName class. Parameter value always must start with a '/'.

public PdfName(string value)

Parameters

value string

Fields

Empty

Represents the empty name.

public static readonly PdfName Empty

Field Value

PdfName

Properties

Comparer

Gets the comparer for this type.

public static PdfName.PdfXNameComparer Comparer { get; }

Property Value

PdfName.PdfXNameComparer

Value

Gets the name as a string.

public string Value { get; }

Property Value

string

Methods

AddSlash(string)

Adds the slash to a string, that is needed at the beginning of a PDFName string.

public static string AddSlash(string value)

Parameters

value string

Returns

string

Equals(object?)

Determines whether the specified object is equal to this name.

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

GetHashCode()

Returns the hash code for this instance.

public override int GetHashCode()

Returns

int

RemoveSlash(string)

Removes the slash from a string, that is needed at the beginning of a PDFName string.

public static string RemoveSlash(string value)

Parameters

value string

Returns

string

ToString()

Returns the name. The string always begins with a slash.

public override string ToString()

Returns

string

Operators

operator ==(PdfName?, string?)

Determines whether the specified name and string are equal.

public static bool operator ==(PdfName? name, string? str)

Parameters

name PdfName
str string

Returns

bool

operator !=(PdfName?, string?)

Determines whether the specified name and string are not equal.

public static bool operator !=(PdfName? name, string? str)

Parameters

name PdfName
str string

Returns

bool