GemBox.Pdf
  • Overview
  • Examples
  • Free version
  • Support
  • Pricelist

    Show / Hide Table of Contents

    PdfName Class

    Namespace:
    GemBox.Pdf.Objects
    Assembly:
    GemBox.Pdf.dll

    Represents an atomic symbol uniquely defined by a sequence of any characters (8-bit values) except null (character code 0).

    • C#
    • VB.NET
    public abstract class PdfName : PdfBasicValue, IEquatable<PdfName>
    Public MustInherit Class PdfName
        Inherits PdfBasicValue
        Implements IEquatable(Of PdfName)
    Inheritance:
    System.Object
    PdfBasicObject
    PdfBasicValue
    PdfName
    Implements
    System.IEquatable<PdfName>

    Properties

    Empty

    Gets the empty PdfName.

    • C#
    • VB.NET
    public static PdfName Empty { get; }
    Public Shared ReadOnly Property Empty As PdfName
    Property Value
    PdfName

    The empty PdfName.

    ObjectType

    Gets the Name value.

    • C#
    • VB.NET
    public sealed override PdfBasicObjectType ObjectType { get; }
    Public NotOverridable Overrides ReadOnly Property ObjectType As PdfBasicObjectType
    Property Value
    PdfBasicObjectType

    The Name value.

    Overrides
    PdfBasicObject.ObjectType

    Methods

    Create(String)

    Creates the PdfName instance from the specified System.String value.

    • C#
    • VB.NET
    public static PdfName Create(string value)
    Public Shared Function Create(value As String) As PdfName
    Parameters
    value
    System.String

    The string value.

    Returns
    PdfName

    A PdfName instance created from the specified System.String value.

    Remarks

    GemBox.Pdf assembly doesn't publicly expose constructors for types assignable from PdfObject (except PdfDocument), PdfContentElement, and PdfBasicObject types. These types are instead instantiated either through static Create or other factory methods.

    Reasons for this is to support either the current or future extensibility of the type without affecting backward compatibility and without using composition to reduce the number of object allocations.

    For example, PdfNumber type is implemented as PdfInteger and internal PdfReal type. When using Create(Double) method, GemBox.Pdf assembly is able to create either PdfReal or PdfInteger, or return a cached instance of PdfInteger available for an implementation-defined interval of integers, thus reducing memory overhead.

    PdfString and PdfName types have several internal implementations that reduce the number of System.Array allocations.

    PdfArray type is currently implemented as a dynamic array. In the future, GemBox.Pdf assembly might provide an internal implementation that is immutable (without a need to use composition) to reduce memory overhead and optimize cloning operation.

    PdfDictionary type is currently implemented as a hash table with a separate chaining collision resolution. In the future, GemBox.Pdf assembly might provide an internal implementation that uses dynamic array (without a need to use composition) if number of entries is small, to reduce memory overhead and, potentially, improve performance.

    All these current and future implementations would not be possible in a backward compatible way (without unnecessary usage of composition) if constructors were publicly exposed.

    Exceptions
    System.ArgumentNullException

    value is null.

    See Also
    GemBox.Pdf.Objects.IPdfAttachedObject

    Equals(PdfName)

    Determines whether the specified PdfName is equal to this PdfName instance.

    • C#
    • VB.NET
    public bool Equals(PdfName other)
    Public Function Equals(other As PdfName) As Boolean
    Parameters
    other
    PdfName

    The PdfName to compare with this PdfName instance.

    Returns
    System.Boolean

    true if the specified PdfName is equal to this PdfName instance; otherwise, false.

    Equals(Object)

    Determines whether the specified System.Object is equal to this PdfName instance.

    • C#
    • VB.NET
    public sealed override bool Equals(object obj)
    Public NotOverridable Overrides Function Equals(obj As Object) As Boolean
    Parameters
    obj
    System.Object

    The System.Object to compare with this PdfName instance.

    Returns
    System.Boolean

    true if the specified System.Object is equal to this PdfName instance; otherwise, false.

    Overrides
    PdfBasicValue.Equals(Object)

    GetHashCode()

    Returns a hash code for this PdfName instance.

    • C#
    • VB.NET
    public override int GetHashCode()
    Public Overrides Function GetHashCode As Integer
    Returns
    System.Int32

    A hash code for this PdfName instance, suitable for use in hashing algorithms and data structures like a hash table.

    Overrides
    PdfBasicValue.GetHashCode()

    ToString()

    Returns a System.String that represents this PdfName instance.

    • C#
    • VB.NET
    public sealed override string ToString()
    Public NotOverridable Overrides Function ToString As String
    Returns
    System.String

    A System.String that represents this PdfName instance.

    Overrides
    PdfBasicObject.ToString()

    Inherited Properties

    Null

    Gets the single instance of Null type.

    (Inherited from PdfBasicObject)

    Implements

    System.IEquatable<T>

    Examples

    Basic Objects example

    See Also

    PDF Specification ISO 32000-1:2008, section '7.3.5 Name Objects'
    Back to top

    Facebook • Twitter • LinkedIn

    © GemBox Ltd. — All rights reserved.