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

    Show / Hide Table of Contents

    PdfObject Class

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

    Represents a base class for all types that implement various PDF components in the GemBox.Pdf assembly.

    • C#
    • VB.NET
    public abstract class PdfObject
    Public MustInherit Class PdfObject
    Inheritance:
    Object
    PdfObject
    Derived
    PdfAction
    PdfAnnotation
    PdfContentResource
    PdfInteractiveForm
    PdfSignature
    PdfSignatureLock
    PdfCollection
    PdfDestination
    PdfDocument
    PdfDocumentIdentifier
    PdfDocumentInformation
    PdfEmbeddedFile
    PdfFileSpecification
    PdfOutline
    PdfPageObject
    PdfRectangle
    PdfViewerPreferences
    PdfXmlMetadataStream
    PdfPortfolio
    PdfPortfolioColors
    PdfPortfolioField
    PdfPortfolioFolder
    PdfDocumentSecurityStore
    PdfEncryptedPayload
    PdfEncryption
    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 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.

    Properties

    Metadata

    (Optional; PDF 1.4) A metadata stream containing metadata for the component.

    • C#
    • VB.NET
    public virtual PdfXmlMetadataStream Metadata { get; }
    Public Overridable ReadOnly Property Metadata As PdfXmlMetadataStream
    Property Value
    PdfXmlMetadataStream

    A metadata stream containing metadata for the component.

    Exceptions
    InvalidPdfDictionaryEntryException

    Value is not according to PDF Specification ISO 32000-1:2008.

    See Also
    PDF Specification ISO 32000-1:2008, section '14.3.2 Metadata Streams'

    Extension Methods

    PdfObjectExtensions.GetDictionary(PdfObject)
    PdfObjectExtensions.GetOrAddDictionary(PdfObject)
    PdfObjectExtensions.GetArray(PdfObject)

    See Also

    GemBox.Pdf.Objects.IPdfAttachedObject
    Back to top

    Facebook • Twitter • LinkedIn

    © GemBox Ltd. — All rights reserved.