Click or drag to resize
Pdf Library for .NET

PdfPortfolioManager Class

Manages a pdf portfolio. Can transform an existing regular pdf into a portfolio, create a new portfolio, or manage the embedded files of an existing one.
Inheritance Hierarchy
SystemObject
  SelectPdf.UniversalPdfPortfolioManager

Namespace: SelectPdf.Universal
Assembly: SelectPdf.Universal (in SelectPdf.Universal.dll) Version: 26.4
Syntax
public class PdfPortfolioManager

The PdfPortfolioManager type exposes the following members.

Constructors
 NameDescription
Public methodPdfPortfolioManagerInitializes a new instance of the PdfPortfolioManager class.
Top
Properties
 NameDescription
Public propertyFiles The collection of embedded files of the portfolio. Accessing it turns a freshly-created or a regular loaded document into a portfolio.
Public propertyStartupFileNameGets or sets the name of the file that opens first in the portfolio.
Public propertyViewModeGets or sets the pdf portfolio view mode.
Top
Methods
 NameDescription
Public methodCloseCloses the document and releases its resources.
Public methodGetDocumentReturns the portfolio as a new PdfDocument.
Public methodLoad(Byte)Loads an existing pdf document from a byte array.
Public methodLoad(PdfDocument)Loads an existing PdfDocument.
Public methodLoad(Stream)Loads an existing pdf document from a stream.
Public methodCode exampleLoad(String)Loads an existing pdf document (regular or portfolio) from a file.
Public methodLoad(Byte, String)Loads a password-protected pdf document from a byte array.
Public methodLoad(PdfDocument, String)Loads an existing PdfDocument with a password.
Public methodLoad(Stream, String)Loads a password-protected pdf document from a stream.
Public methodLoad(String, String)Loads a password-protected pdf document from a file.
Public methodSaveSaves the portfolio and returns the bytes.
Public methodSave(Stream)Saves the portfolio to a stream.
Public methodCode exampleSave(String)Saves the portfolio to a file.
Top
Example
PdfPortfolioManager manager = new PdfPortfolioManager();
manager.Files.Add(new PdfPortfolioFile("report.pdf",
    System.IO.File.ReadAllBytes("report.pdf")));
manager.Files.Add(new PdfPortfolioFile("data.csv",
    System.IO.File.ReadAllBytes("data.csv")));
manager.ViewMode = PdfPortfolioViewMode.Details;
manager.Save("portfolio.pdf");
manager.Close();
See Also