Click or drag to resize

PdfPortfolioFileCollectionAddEmpty Method

Add a new PdfFileSpecification with the specified name and an empty EmbeddedFile to EmbeddedFiles under the PdfPortfolio (root file) or parent PdfPortfolioFolder.

Use the OpenWrite(Boolean) method of the EmbeddedFile of a returned PdfFileSpecification to fill the empty EmbeddedFile.


Namespace: SautinSoft.Pdf.Portfolios
Assembly: SautinSoft.Pdf (in SautinSoft.Pdf.dll) Version: 2025.10.22
Syntax
public PdfFileSpecification AddEmpty(
	string fileSpecificationName
)

Parameters

fileSpecificationName  String
The name of a newly added PdfFileSpecification. This value is also used to resolve a key in the EmbeddedFiles of a newly added PdfFileSpecification.

Return Value

PdfFileSpecification
A newly created PdfFileSpecification with the specified name and an empty EmbeddedFile added to the EmbeddedFiles under the PdfPortfolio (root file) or parent PdfPortfolioFolder.
Exceptions
ExceptionCondition
ArgumentNullExceptionfileSpecificationName is or Empty.
ArgumentExceptionA PdfFileSpecification with the same key already exists in the EmbeddedFiles.
NotSupportedExceptionThe parent PdfPortfolioFolder is not in the PDF portfolio.
See Also