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

    Show / Hide Table of Contents

    PdfPortfolioFieldDictionary Class

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

    Represents a collection of PdfPortfolioFields. Each PdfPortfolioField has a PdfName key chosen by the conforming writer, which shall be used to associate a field with data in a PortfolioFieldValues or a PortfolioFieldValues.

    • C#
    • VB.NET
    public sealed class PdfPortfolioFieldDictionary : PdfCollection<KeyValuePair<PdfName, PdfPortfolioField>>, IList, ICollection, IList<KeyValuePair<PdfName, PdfPortfolioField>>, ICollection<KeyValuePair<PdfName, PdfPortfolioField>>, IReadOnlyList<KeyValuePair<PdfName, PdfPortfolioField>>, IReadOnlyCollection<KeyValuePair<PdfName, PdfPortfolioField>>, IEnumerable<KeyValuePair<PdfName, PdfPortfolioField>>, IEnumerable
    Public NotInheritable Class PdfPortfolioFieldDictionary
        Inherits PdfCollection(Of KeyValuePair(Of PdfName, PdfPortfolioField))
        Implements IList, ICollection, IList(Of KeyValuePair(Of PdfName, PdfPortfolioField)), ICollection(Of KeyValuePair(Of PdfName, PdfPortfolioField)), IReadOnlyList(Of KeyValuePair(Of PdfName, PdfPortfolioField)), IReadOnlyCollection(Of KeyValuePair(Of PdfName, PdfPortfolioField)), IEnumerable(Of KeyValuePair(Of PdfName, PdfPortfolioField)), IEnumerable
    Inheritance:
    System.Object
    PdfObject
    PdfCollection
    PdfCollection<System.Collections.Generic.KeyValuePair<PdfName, PdfPortfolioField>>
    PdfPortfolioFieldDictionary
    Implements
    System.Collections.IList
    System.Collections.ICollection
    System.Collections.Generic.IList<System.Collections.Generic.KeyValuePair<PdfName, PdfPortfolioField>>
    System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<PdfName, PdfPortfolioField>>
    System.Collections.Generic.IReadOnlyList<System.Collections.Generic.KeyValuePair<PdfName, PdfPortfolioField>>
    System.Collections.Generic.IReadOnlyCollection<System.Collections.Generic.KeyValuePair<PdfName, PdfPortfolioField>>
    System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<PdfName, PdfPortfolioField>>
    System.Collections.IEnumerable

    Properties

    Item[PdfName]

    Gets or sets the PdfPortfolioField associated with the specified PdfName key.

    • C#
    • VB.NET
    public PdfPortfolioField this[PdfName key] { get; set; }
    Public Property Item(key As PdfName) As PdfPortfolioField
    Parameters
    key
    PdfName

    The PdfName key of the PdfPortfolioField to get or set.

    Property Value
    PdfPortfolioField

    The PdfPortfolioField associated with the specified PdfName key. If the specified key is not found, a get operation returns null. A set operation overrides existing or adds a new entry with the specified PdfName key and PdfPortfolioField.

    Exceptions
    System.ArgumentNullException

    key or value is null.

    System.ArgumentException

    key name is 'Type' which is reserved.

    Methods

    Add(PdfPortfolioFieldDataType, String)

    Adds a new PdfPortfolioField with the specified data type and name to the PdfPortfolioFieldDictionary.

    Use the returned PdfName key to populate PortfolioFieldValues and PortfolioFieldValues and use the returned PdfPortfolioField value to customize it further.

    • C#
    • VB.NET
    public KeyValuePair<PdfName, PdfPortfolioField> Add(PdfPortfolioFieldDataType dataType, string name)
    Public Function Add(dataType As PdfPortfolioFieldDataType, name As String) As KeyValuePair(Of PdfName, PdfPortfolioField)
    Parameters
    dataType
    PdfPortfolioFieldDataType

    The data type of PdfPortfolioFieldValue or PdfFileSpecification and PdfPortfolioFolder related property that a newly added PdfPortfolioField describes.

    name
    System.String

    The textual name of a newly added PdfPortfolioField that shall be presented to the user by the conforming reader. This value is also used to resolve a key in the PdfPortfolioFieldDictionary of a newly added PdfPortfolioField.

    Returns
    System.Collections.Generic.KeyValuePair<PdfName, PdfPortfolioField>

    A newly created PdfPortfolioField with the specified data type and name added to the PdfPortfolioFieldDictionary under the returned key.

    Exceptions
    System.ArgumentNullException

    name is null or System.String.Empty.

    System.ArgumentException

    A PdfPortfolioField with the same key already exists in the PdfPortfolioFieldDictionary or a key name is 'Type' which is reserved.

    Contains(PdfName)

    Determines whether the PdfPortfolioFieldDictionary contains the PdfPortfolioField with the specified PdfName key.

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

    The PdfName key to locate in the PdfPortfolioFieldDictionary.

    Returns
    System.Boolean

    true if the PdfPortfolioFieldDictionary contains the PdfPortfolioField with the specified PdfName key; otherwise, false.

    Exceptions
    System.ArgumentNullException

    key is null.

    GetEnumerator()

    Returns an enumerator that iterates through the PdfPortfolioFieldDictionary.

    • C#
    • VB.NET
    public PdfPortfolioFieldDictionary.Enumerator GetEnumerator()
    Public Function GetEnumerator As PdfPortfolioFieldDictionary.Enumerator
    Returns
    PdfPortfolioFieldDictionary.Enumerator

    A PdfPortfolioFieldDictionary.Enumerator for the PdfPortfolioFieldDictionary.

    Remove(PdfName)

    Removes the PdfPortfolioField with the specified key from the PdfPortfolioFieldDictionary.

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

    The key of the PdfPortfolioField to remove.

    Returns
    System.Boolean

    true if the key is found and the PdfPortfolioField removed; otherwise, false. This method returns false if key is not found in the PdfPortfolioFieldDictionary.

    Exceptions
    System.ArgumentNullException

    key is null.

    Inherited Properties

    Count

    Gets the number of elements contained in the PdfCollection.

    (Inherited from PdfCollection)

    Metadata

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

    (Inherited from PdfObject)

    Inherited Methods

    Clear()

    Removes all elements from the PdfCollection.

    (Inherited from PdfCollection)

    RemoveAt(System.Int32)

    Removes the element at the specified index of the PdfCollection.

    (Inherited from PdfCollection)

    Implements

    System.Collections.IList
    System.Collections.ICollection
    System.Collections.Generic.IList<T>
    System.Collections.Generic.ICollection<T>
    System.Collections.Generic.IReadOnlyList<T>
    System.Collections.Generic.IReadOnlyCollection<T>
    System.Collections.Generic.IEnumerable<T>
    System.Collections.IEnumerable

    Extension Methods

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

    Examples

    Portfolios example

    See Also

    PDF Specification ISO 32000-1:2008, section '12.3.5 Collections'
    Back to top

    Facebook • Twitter • LinkedIn

    © GemBox Ltd. — All rights reserved.