Click or drag to resize
Pdf Library for .NET

PdfPortfolioManager Class

Manage pdf portfolio. Can be used to transform an existing pdf regular file into a pdf portfolio, create a new pdf portfolio or manage an existing pdf portfolio.
Inheritance Hierarchy
SystemObject
  SelectPdfPdfManager
    SelectPdfPdfPortfolioManager

Namespace:  SelectPdf
Assembly:  Select.Pdf (in Select.Pdf.dll) Version: 24.1
Syntax
public class PdfPortfolioManager : PdfManager

The PdfPortfolioManager type exposes the following members.

Constructors
  NameDescription
Public methodPdfPortfolioManager
Instantiates the PdfPortfolioManager object.
Top
Properties
  NameDescription
Public propertyFiles
Collection of pdf portfolio embedded files from the current pdf document that represents a pdf portfolio.
Public propertyStartupFileName
Gets or sets the name of the startup file in the pdf portfolio.
Public propertyViewMode
Gets or sets the pdf portfolio view mode.
Top
Methods
  NameDescription
Public methodClose
Closes the opened pdf document.
(Inherited from PdfManager.)
Public methodGetDocument
Returns the pdf document as PdfDocument object.
(Inherited from PdfManager.)
Public methodLoad(Byte)
Loads a pdf document from a byte array.
(Inherited from PdfManager.)
Public methodLoad(Stream)
Loads a pdf document from the specified stream.
(Inherited from PdfManager.)
Public methodLoad(String)
Loads a pdf document from an existing pdf file.
(Inherited from PdfManager.)
Public methodLoad(PdfDocument)
Loads a pdf document from an existing PdfDocument object.
(Inherited from PdfManager.)
Public methodLoad(Byte, String)
Loads a password protected pdf document from a byte array.
(Inherited from PdfManager.)
Public methodLoad(Stream, String)
Loads a pdf document from a stream containing a password protected pdf document.
(Inherited from PdfManager.)
Public methodLoad(String, String)
Loads a pdf document from an existing password protected pdf file.
(Inherited from PdfManager.)
Public methodLoad(PdfDocument, String)
Loads a pdf document from an existing password protected PdfDocument object.
(Inherited from PdfManager.)
Public methodSave
Saves the pdf document as byte array.
(Inherited from PdfManager.)
Public methodSave(Stream)
Saves the pdf document to the specified stream.
(Inherited from PdfManager.)
Public methodSave(String)
Saves the pdf document to the specified file.
(Inherited from PdfManager.)
Top
Examples
The following sample code shows how the portfolio manager can be instantiated and some files added:
// the test files
string filePdf = Server.MapPath("~/files/doc.pdf");
string fileHtml = Server.MapPath("~/files/document.html");
string fileImage = Server.MapPath("~/files/logo.png");

// instantiate the pdf portfolio manager
PdfPortfolioManager portfolio = new PdfPortfolioManager();

// add files to the portfolio
PdfPortfolioFile pdfFilePdf = new PdfPortfolioFile(filePdf);
pdfFilePdf.Description = "PDF document";
portfolio.Files.Add(pdfFilePdf);

PdfPortfolioFile pdfFileHtml = new PdfPortfolioFile(fileHtml);
pdfFileHtml.Description = "HTML document";
portfolio.Files.Add(pdfFileHtml);

PdfPortfolioFile pdfFileImage = new PdfPortfolioFile(fileImage);
pdfFileImage.Description = "Image file";
portfolio.Files.Add(pdfFileImage);

// set view mode
portfolio.ViewMode = PdfPortfolioViewMode.Details;

// set startup file
portfolio.StartupFileName = "logo.png";

// save pdf document
portfolio.Save(Response, false, "Sample.pdf");

// close pdf document
portfolio.Close();
See Also