PdfPortfolioFolderCollectionAdd Method |
Namespace: SautinSoft.Pdf.PortfoliosAssembly: SautinSoft.Pdf (in SautinSoft.Pdf.dll) Version: 2025.11.10
Syntaxpublic PdfPortfolioFolder Add(
string folderPath,
bool recursive = true
)
Public Function Add (
folderPath As String,
Optional recursive As Boolean = true
) As PdfPortfolioFolder
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| Exception | Condition |
|---|
| ArgumentNullException | folderPath is or Empty. |
| ArgumentException | The 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. |
| NotSupportedException | The parent PdfPortfolioFolder is not in the PDF portfolio. |
See Also