We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Document save when using FileStream corrupts document (DOCX)

Hi Aspose team,

I am opening document with FileStream (have to use it), making changes in LinkSources and then using FileStream saving document.

Unfortunately documents is corrupted after save.

Can you please check? Sample project is attached.

BR,
Oliver

Hi Oliver,


Thanks for your inquiry. Second time when you create instance of FileStream, please specify FileMode.Truncate instead of FileMode.OpenOrCreate. Hope, this helps.

Best regards,