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

    Show / Hide Table of Contents

    PdfPortfolioFolderCollection Class

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

    Represents a collection of a PdfPortfolioFolders contained in the Folders (root folders) or some Folders.

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

    This collection is implemented as singly linked list and therefore methods that use random access (index) or modify the collection are an O(n) operations, where n is PdfPortfolioFolderCollection count.

    Methods

    Add(String, Boolean)

    Adds a new PdfPortfolioFolder with the files and folders copied from the file system folder specified by the folderPath to the PdfPortfolio (root folder) or parent PdfPortfolioFolder.

    • C#
    • VB.NET
    public PdfPortfolioFolder Add(string folderPath, bool recursive = true)
    Public Function Add(folderPath As String, recursive As Boolean = True) As PdfPortfolioFolder
    Parameters
    folderPath
    System.String

    The location of the file system folder whose files and folders are copied to a newly added PdfPortfolioFolder. This value is also used to resolve the Name of a newly added PdfPortfolioFolder.

    recursive
    System.Boolean

    If set to true then all files and subfolders contained under the folderPath are copied.

    Returns
    PdfPortfolioFolder

    A newly created PdfPortfolioFolder with the files and folders copied from the file system folder specified by the folderPath added to the PdfPortfolio (root folder) or parent PdfPortfolioFolder.

    Exceptions
    System.ArgumentNullException

    folderPath is null or System.String.Empty.

    System.ArgumentException

    The folder with folderPath either doesn't exist or an error occurred while trying to determine if the specified folder exists or a PdfPortfolioFolder with the same name already exists in this PdfPortfolioFolder or a PdfFileSpecification with the same key already exists in the EmbeddedFiles.

    System.NotSupportedException

    The parent PdfPortfolioFolder is not in the PDF portfolio.

    AddEmpty(String)

    Adds a new empty PdfPortfolioFolder to the PdfPortfolio (root folder) or parent PdfPortfolioFolder.

    • C#
    • VB.NET
    public PdfPortfolioFolder AddEmpty(string portfolioFolderName)
    Public Function AddEmpty(portfolioFolderName As String) As PdfPortfolioFolder
    Parameters
    portfolioFolderName
    System.String

    The name of a newly added PdfPortfolioFolder.

    Returns
    PdfPortfolioFolder

    A newly created empty PdfPortfolioFolder with the specified name added to the PdfPortfolio (root folder) or parent PdfPortfolioFolder.

    Exceptions
    System.ArgumentNullException

    portfolioFolderName is null or System.String.Empty.

    System.ArgumentException

    A PdfPortfolioFolder with the same name already exists in this PdfPortfolioFolder.

    System.NotSupportedException

    The parent PdfPortfolioFolder is not in the PDF portfolio.

    GetEnumerator()

    Returns an enumerator that iterates through the PdfPortfolioFolderCollection.

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

    A PdfPortfolioFolderCollection.Enumerator for the PdfPortfolioFolderCollection.

    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
    Portfolios example
    Portfolios example
    Back to top

    Facebook • Twitter • LinkedIn

    © GemBox Ltd. — All rights reserved.