PDFsharp-net6

PdfNameObject

Namespace: PdfSharp.Pdf

Represents an indirect name value. This type is not used by PDFsharp. If it is imported from an external PDF file, the value is converted into a direct object. Acrobat sometime uses indirect names to save space, because an indirect reference to a name may be shorter than a long name.

public sealed class PdfNameObject : PdfObject, System.ICloneable

Inheritance ObjectPdfItemPdfObjectPdfNameObject
Implements ICloneable

Properties

Value

Gets or sets the name value.

public string Value { get; set; }

Property Value

String

Owner

Gets the PdfDocument this object belongs to.

public PdfDocument Owner { get; }

Property Value

PdfDocument

IsIndirect

Indicates whether the object is an indirect object.

public bool IsIndirect { get; }

Property Value

Boolean

Internals

Gets the PdfInternals object of this document, that grants access to some internal structures which are not part of the public interface of PdfDocument.

public PdfObjectInternals Internals { get; }

Property Value

PdfObjectInternals

Reference

Gets the indirect reference of this object. If the value is null, this object is a direct object.

public PdfReference Reference { get; internal set; }

Property Value

PdfReference

ReferenceNotNull

Gets the indirect reference of this object. Throws if it is null.

public PdfReference ReferenceNotNull { get; }

Property Value

PdfReference

Exceptions

InvalidOperationException
The indirect reference must be not null here.

Constructors

PdfNameObject()

Initializes a new instance of the PdfNameObject class.

public PdfNameObject()

PdfNameObject(PdfDocument, String)

Initializes a new instance of the PdfNameObject class.

public PdfNameObject(PdfDocument document, string value)

Parameters

document PdfDocument
The document.

value String
The value.

Methods

Equals(Object)

Determines whether the specified object is equal to the current object.

public bool Equals(object obj)

Parameters

obj Object

Returns

Boolean

GetHashCode()

Serves as a hash function for this type.

public int GetHashCode()

Returns

Int32

ToString()

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

public string ToString()

Returns

String

WriteObject(PdfWriter)

Writes the name including the leading slash.

internal void WriteObject(PdfWriter writer)

Parameters

writer PdfWriter