Click or drag to resize

PdfPortfolioFolderCollectionAdd Method

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.

Namespace: SautinSoft.Pdf.Portfolios
Assembly: SautinSoft.Pdf (in SautinSoft.Pdf.dll) Version: 2025.11.10
Syntax
public PdfPortfolioFolder Add(
	string folderPath,
	bool recursive = true
)

Parameters

folderPath  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  Boolean  (Optional)
If set to then all files and subfolders contained under the folderPath are copied.

Return Value

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
ExceptionCondition
ArgumentNullExceptionfolderPath is or Empty.
ArgumentExceptionThe folder with folderPath either doesn't exist or an error occured 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.
NotSupportedExceptionThe parent PdfPortfolioFolder is not in the PDF portfolio.
See Also