Watermark above table

Hi,

We are having Watermark in our Word Document which is displaying behind the table/grid. IS It possible to display it visible above grid.

@NanthiniSenthil123 When you create a watermark in MS Word or in Aspose.Words, the watermark shape is inserted into the document header and is repeated for each page. Both MS Word and Aspose.Words does not have a built-in method for inserting a watermark in the foreground, because to achieve this the watermark has to be inserted into the main body of the document and since MS Word documents are flow document, editing of the document with a watermark in the main body might shift the watermark.
However, you can achieve using Aspose.Words, you should insert a watermark shape on each page in the document. For example you can use code suggested here:
https://forum.aspose.com/t/feature-request-watermark-visibility-foreground-stamp-option/236492/7

Hi,
The above code helps,but it is inserting a new watermark in document.Can you share me the code to find watermark if present in document and to add shapes to it

@NanthiniSenthil123 When you insert a watermark using MS Word or using Aspose.Words (Watermark), the shape, which represent a watermark has special name that starts with PowerPlusWaterMarkObject, so it can be identified. You can use code like this to get watermark shapes in the document:

List<Shape> watermarkShapes = doc.GetChildNodes(NodeType.Shape, true)
    .Cast<Shape>().Where(s => s.Name.StartsWith("PowerPlusWaterMarkObject")).ToList();

Can we use the above code and find if any watermark present in document and to set width,height,font for Watermark.

I want to find the Watermark from word document and update it with font and style.Can you share code for this.

@NanthiniSenthil123 You can use code like this:

Document doc = new Document(@"C:\Temp\in.docx");

List<Shape> watermarkShapes = doc.GetChildNodes(NodeType.Shape, true)
    .Cast<Shape>().Where(s => s.Name.StartsWith("PowerPlusWaterMarkObject")).ToList();

foreach (Shape s in watermarkShapes)
{
    if (s.ShapeType == ShapeType.TextPlainText)
    {
        s.TextPath.Text = "This is new watermark text";
        // Chnage font
        s.Font.Name = "Times New Roman";
        s.Font.Bold = true;
        // etc .......
    }
}

doc.Save(@"C:\Temp\out.docx");