PdfEmbeddedFile.ReplaceWith Method (String)

Replaces embedded file contents with contents of the specified file.

Namespace:  BitMiracle.Docotic.Pdf
Assembly:  BitMiracle.Docotic.Pdf (in BitMiracle.Docotic.Pdf.dll)

Syntax

C#
public void ReplaceWith(
	string fileName
)
VB
Public Sub ReplaceWith ( 
	fileName As String
)

Parameters

fileName
Type: System.String
The name of the file with the new contents.

Remarks

This method replaces contents of the embedded file, updates ModifiedDate, Size and the checksum (if specified).

This method respects the WriteWithoutCompression setting.

This method does not update MimeType property. You should update the property yourselves if the new content has different MIME type.

Replacing contents of an embedded file can cause unexpected results if the new contents has different structure or broken in any way.

See Also