Hi,
Using Spire.Doc to change word doc file.
Then we need this file to be saved as .doc and .pdf.
After inserting watermark in doc file stoped to open properly - World starts to display scurity alarm (see attached file).
Have a nice day.
Document document = new Document(originalDocFile);
InsertWatermark(document.Sections[0]); // add a watermark to doc file
document.SaveToFile(fileNameDocx,FileFormat.Docx); // save document as a Docx format document
//document.SaveToFile(fileNameDocx, FileFormat.Docx2010); //save document as a Docx2010 format document
static void Main(string[] args)
{
Document documentdoc = new Document(originalDocFile);
InsertWatermark(documentdoc.Sections[0]);
CultureInfo cc = Thread.CurrentThread.CurrentCulture;
Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture;
documentdoc.SaveToFile(@"sample2003.doc", FileFormat.Doc);
documentdoc.SaveToFile(@"sample2007.docx", FileFormat.Docx);
//documentdoc.SaveToFile(@"sample2010.docx", FileFormat.Docx2010);
Thread.CurrentThread.CurrentCulture = cc;
}