Click or drag to resize

PdfEmbeddedFileSpecificationTreeAdd(String) Method

Adds a new PdfFileSpecification with the EmbeddedFile copied from the resource specified by the filePath.

Namespace: SautinSoft.Pdf
Assembly: SautinSoft.Pdf (in SautinSoft.Pdf.dll) Version: 2024.8.8
Syntax
public KeyValuePair<PdfString, PdfFileSpecification> Add(
	string filePath
)

Parameters

filePath  String
The location of the resource copied to the EmbeddedFile of a newly added PdfFileSpecification. This value is also used to resolve the Name and a key in the PdfEmbeddedFileSpecificationTree of a newly added PdfFileSpecification.

Return Value

KeyValuePairPdfString, PdfFileSpecification
A newly created PdfFileSpecification with the EmbeddedFile copied from the resource specified by the filePath added to the PdfEmbeddedFileSpecificationTree under the returned key.
Exceptions
ExceptionCondition
ArgumentNullExceptionfilePath is or Empty.
ArgumentExceptionA PdfFileSpecification with the same key already exists in the PdfEmbeddedFileSpecificationTree.
Remarks
The EmbeddedFile's Size, CreationDate, ModificationDate, and MediaType properties are automatically set, if they can be resolved from the resource specified by the filePath.
See Also