Method ReplaceWith
- Namespace
- BitMiracle.Docotic.Pdf
- Assembly
- BitMiracle.Docotic.Pdf.dll
ReplaceWith(byte[])
Replaces embedded file contents with the provided bytes.
public void ReplaceWith(byte[] bytes)
Parameters
bytesbyte[]The array of bytes.
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.
ReplaceWith(string)
Replaces embedded file contents with contents of the specified file.
public void ReplaceWith(string fileName)
Parameters
fileNamestringThe 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.
ReplaceWith(Stream)
Replaces embedded file contents with contents of the specified stream.
public void ReplaceWith(Stream stream)
Parameters
streamStreamThe stream 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.