Click or drag to resize

PdfAssociatedFileCollectionAddEmpty Method

Adds a new PdfFileSpecification with the specified relationship and an empty EmbeddedFile.

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


Namespace: SautinSoft.Pdf
Assembly: SautinSoft.Pdf (in SautinSoft.Pdf.dll) Version: 2024.6.18
Syntax
public PdfFileSpecification AddEmpty(
	PdfAssociatedFileRelationshipType associatedRelationshipType,
	string fileSpecificationName,
	string mediaType = null,
	PdfEmbeddedFileSpecificationTree embeddedFiles = null
)

Parameters

associatedRelationshipType  PdfAssociatedFileRelationshipType
The relationship between the component of a PDF document that refers to this PdfAssociatedFileCollection and the newly added PdfFileSpecification.
fileSpecificationName  String
The name of a newly added PdfFileSpecification. This value is also used to resolve a key in the PdfEmbeddedFileSpecificationTree (if embeddedFiles is not ) of a newly added PdfFileSpecification.
mediaType  String  (Optional)
The media type of the embedded file.
embeddedFiles  PdfEmbeddedFileSpecificationTree  (Optional)
The EmbeddedFiles to which the newly created PdfFileSpecification should be added or .

Return Value

PdfFileSpecification
A newly created PdfFileSpecification with the specified relationship and an empty EmbeddedFile added to the PdfAssociatedFileCollection.
Exceptions
ExceptionCondition
ArgumentNullExceptionfileSpecificationName is or Empty.
See Also