Aspose.Words.Examples.CSharp.Programming_Documents.Working_with_Images.AddWatermark.Run C# (CSharp) Méthode

Run() public static méthode

public static Run ( ) : void
Résultat 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);
        }