Hi Sarath,
Unfortunetly I am unable to provide document that I'm having difficulties with due to confidentiality rules.
The code that I am using is:
using (FileStream filestream = new FileStream(filePath, FileMode.Open, FileAccess.Read))
{
using (WordDocument document = new WordDocument(filestream, FormatType.Automatic))
{
TextWatermark textWatermark = new TextWatermark()
{
Size = 10,
FontName = "Arial Black",
Color = Color.Gray,
Layout = WatermarkLayout.Diagonal,
Semitransparent = false,
Text = watermarkText
};
document.Watermark = textWatermark;
document.Save(filePath.Replace(".doc", "6.doc"), document.ActualFormatType);
document.Close();
}
filestream.Close();
}
I found switching to opening the file via a file stream reduced the opening time by 10 seconds. But the conversion from stream to WordDocument is still taking one minute forty seconds.
The version of FileFormat that I'm using is "SyncFusion Essential Studio 14.1.0.41"