Aspose.Words.Examples.CSharp.Programming_Documents.Working_with_Images.AddWatermark.Run C# (CSharp) Method

Run() public static method

public static Run ( ) : void
return void
        public static void Run()
        {
            // The path to the documents directory.
            string dataDir = RunExamples.GetDataDir_WorkingWithImages();
            string fileName = "TestFile.Watermark.doc";
            Document doc = new Document(dataDir + fileName);
            InsertWatermarkText(doc, "CONFIDENTIAL");
            dataDir = dataDir + RunExamples.GetOutputFilePath(fileName);
            doc.Save(dataDir);

            Console.WriteLine("\nAdded watermark to the document successfully.\nFile saved at " + dataDir);
        }