Click or drag to resize
Pdf Library for .NET

PdfPortfolioFile Class

Represents a single embedded file of a pdf portfolio.
Inheritance Hierarchy
SystemObject
  SelectPdf.UniversalPdfPortfolioFile

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

The PdfPortfolioFile type exposes the following members.

Constructors
 NameDescription
Public methodPdfPortfolioFile(String)Creates an embedded file from a file on disk (the name must include an extension).
Public methodPdfPortfolioFile(String, Byte)Creates an embedded file with the given name from a byte array.
Public methodPdfPortfolioFile(String, Stream)Creates an embedded file with the given name from a stream.
Top
Properties
 NameDescription
Public propertyContent The binary content of the embedded file. Before the file is added to a portfolio this is the content its constructor was given (read from disk for the file-name constructor); afterwards it is the content of the attachment itself.
Public propertyContentAsStream The binary content of the embedded file as a stream, or null when there is no content to read. Each read returns a fresh stream over a copy of the content.
Public propertyCreationDateThe creation date of the embedded file.
Public propertyDescriptionThe description of the embedded file.
Public propertyModificationDateThe modification date of the embedded file.
Public propertyNameThe name of the embedded file (must include an extension).
Top
Example
PdfPortfolioFile file =
    new PdfPortfolioFile("data.csv", System.IO.File.ReadAllBytes("data.csv"));
file.Description = "Monthly figures";
manager.Files.Add(file);
See Also