PDFsharp-net6

PdfName

Namespace: PdfSharp.Pdf

Represents a PDF name value.

public sealed class PdfName : PdfItem, System.ICloneable

Inheritance ObjectPdfItemPdfName
Implements ICloneable

Fields

Empty

Represents the empty name.

public static PdfName Empty;

Properties

Value

Gets the name as a string.

public string Value { get; }

Property Value

String

Comparer

Gets the comparer for this type.

public static PdfXNameComparer Comparer { get; }

Property Value

PdfXNameComparer

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

Methods

Equals(Object)

Determines whether the specified object is equal to this name.

public bool Equals(object obj)

Parameters

obj Object

Returns

Boolean

GetHashCode()

Returns the hash code for this instance.

public int GetHashCode()

Returns

Int32

ToString()

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

public string ToString()

Returns

String

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

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

WriteObject(PdfWriter)

Writes the name including the leading slash.

internal void WriteObject(PdfWriter writer)

Parameters

writer PdfWriter