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

    Show / Hide Table of Contents

    PdfPortfolio Class

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

    Specifies how a conforming reader's user interface presents collections of EmbeddedFiles.

    If Portfolio property of a PdfDocument is not null, the conforming reader shall present the document as a PDF Portfolio (also known as portable collection).

    The file attachments comprising a PDF Portfolio shall be located in the EmbeddedFiles name tree. All attachments in that tree are in the PDF Portfolio; any attachments not in that tree are not.

    When a conforming reader first opens a PDF Portfolio document, it shall display the contents of the InitialFile, along with a list of the documents present in the EmbeddedFiles name tree. The document list shall include the additional document information specified by the Fields. The initial document may be the container PDF (if InitialFile is null) or one of the embedded documents.

    • C#
    • VB.NET
    public sealed class PdfPortfolio : PdfObject
    Public NotInheritable Class PdfPortfolio
        Inherits PdfObject
    Inheritance:
    System.Object
    PdfObject
    PdfPortfolio

    Properties

    Colors

    (Optional; PDF 2.0) A PdfPortfolioColors specifying a suggested set of colors for use by a PdfPortfolio layout.

    • C#
    • VB.NET
    public PdfPortfolioColors Colors { get; }
    Public ReadOnly Property Colors As PdfPortfolioColors
    Property Value
    PdfPortfolioColors

    A PdfPortfolioColors specifying a suggested set of colors for use by a PdfPortfolio layout.

    Fields

    Gets the Portfolio fields. If empty, the conforming reader may choose useful defaults that are known to exist in a PdfFileSpecification, such as the Name, Size, and ModificationDate.

    • C#
    • VB.NET
    public PdfPortfolioFieldDictionary Fields { get; }
    Public ReadOnly Property Fields As PdfPortfolioFieldDictionary
    Property Value
    PdfPortfolioFieldDictionary

    The Portfolio fields.

    See Also
    PDF Specification ISO 32000-1:2008, section '12.3.5 Collections'

    Files

    Gets the root EmbeddedFiles contained in the PdfPortfolio.

    • C#
    • VB.NET
    public PdfPortfolioFileCollection Files { get; }
    Public ReadOnly Property Files As PdfPortfolioFileCollection
    Property Value
    PdfPortfolioFileCollection

    The root EmbeddedFiles contained in the PdfPortfolio.

    Folders

    Gets the root folders contained in the PdfPortfolio.

    • C#
    • VB.NET
    public PdfPortfolioFolderCollection Folders { get; }
    Public ReadOnly Property Folders As PdfPortfolioFolderCollection
    Property Value
    PdfPortfolioFolderCollection

    The root folders contained in the PdfPortfolio.

    InitialFile

    (Optional) The embedded file that shall be initially presented in the user interface. If the InitialFile is null or is not a valid PdfFileSpecification, the initial file shall be the current document (PDF Portfolio). If the InitialFile is valid and does not match any file in the EmbeddedFiles name tree, the interactive PDF processor shall select the first item from the list of files to display in its user interface; if no files exist in the name tree, the interactive PDF processor shall display an empty preview window.

    (PDF 2.0) For unencrypted wrapper documents for an encrypted payload document the InitialFile is required, and shall identify the encrypted payload entry in the EmbeddedFiles name tree.

    • C#
    • VB.NET
    public PdfFileSpecification InitialFile { get; set; }
    Public Property InitialFile As PdfFileSpecification
    Property Value
    PdfFileSpecification

    The embedded file that shall be initially presented in the user interface.

    Remarks

    When setting a value this property performs a linear search in the EmbeddedFiles to find a key associated with the PdfFileSpecification that is to be set; therefore, it is an O(n) operation, where n is EmbeddedFiles count.

    Exceptions
    System.ArgumentException

    The PdfFileSpecification is not in the PDF Portfolio (not contained in the EmbeddedFiles).

    See Also
    PDF Specification ISO 32000-1:2008, section '12.3.5 Collections'

    SortLevels

    Gets the sort levels by which PdfFileSpecification and PdfPortfolioFolder in the PdfPortfolio are sorted.

    If multiple PdfFileSpecification and PdfPortfolioFolder in the PdfPortfolio have the same value for the field specified by the first level in the collection, the values for fields specified by the successive levels in the collection shall be used for sorting, until a unique order is determined or until the sort levels are exhausted.

    • C#
    • VB.NET
    public PdfPortfolioSortLevelCollection SortLevels { get; }
    Public ReadOnly Property SortLevels As PdfPortfolioSortLevelCollection
    Property Value
    PdfPortfolioSortLevelCollection

    The sort levels by which PdfFileSpecification and PdfPortfolioFolder in the PdfPortfolio are sorted.

    See Also
    PDF Specification ISO 32000-1:2008, section '12.3.5 Collections'

    SplitDirection

    (Optional; PDF 2.0) The orientation of the PdfPortfolio splitter bar.

    • C#
    • VB.NET
    public PdfPortfolioSplitDirection? SplitDirection { get; set; }
    Public Property SplitDirection As PdfPortfolioSplitDirection?
    Property Value
    System.Nullable<PdfPortfolioSplitDirection>

    The orientation of the PdfPortfolio splitter bar.

    Remarks

    When displaying a PdfPortfolio, an interactive PDF processor presents an initial view in which the available display area may be divided by a splitter bar into two areas; one area containing a display of the navigation controls of the PdfPortfolio as defined by the ViewType property, and one area containing a preview of the initial or currently selected document of the PdfPortfolio. The visibility, orientation or position of the splitter bar may be interactively adjusted by user action subsequent to its initial view as defined by the SplitDirection and SplitPosition properties, if provided.

    SplitPosition

    (Optional; PDF 2.0) The initial position of the PdfPortfolio splitter bar, specified as a percentage of the available window area. Values shall range from 0 to 100. The property shall be ignored if SplitDirection is set to None.

    • C#
    • VB.NET
    public double? SplitPosition { get; set; }
    Public Property SplitPosition As Double?
    Property Value
    System.Nullable<System.Double>

    The initial position of the PdfPortfolio splitter bar, specified as a percentage of the available window area.

    Remarks

    When displaying a PdfPortfolio, an interactive PDF processor presents an initial view in which the available display area may be divided by a splitter bar into two areas; one area containing a display of the navigation controls of the PdfPortfolio as defined by the ViewType property, and one area containing a preview of the initial or currently selected document of the PdfPortfolio. The visibility, orientation or position of the splitter bar may be interactively adjusted by user action subsequent to its initial view as defined by the SplitDirection and SplitPosition properties, if provided.

    Exceptions
    System.ArgumentOutOfRangeException

    Value must be between 0 and 100 (inclusive).

    ViewType

    (Optional) The initial view.

    Default value: Details.

    • C#
    • VB.NET
    public PdfPortfolioViewType ViewType { get; set; }
    Public Property ViewType As PdfPortfolioViewType
    Property Value
    PdfPortfolioViewType

    The initial view.

    See Also
    PDF Specification ISO 32000-1:2008, section '12.3.5 Collections'

    Inherited Properties

    Metadata

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

    (Inherited from PdfObject)

    Extension Methods

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

    Examples

    Portfolios example

    See Also

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

    Facebook • Twitter • LinkedIn

    © GemBox Ltd. — All rights reserved.