Free Support Forum - aspose.com

Populating watermark with value from XML

Hi Roman,

Does Aspose allow us to populate the document watermark with a value taken from the input XML document.

We have a “Document Type” node in our input XML document, and if this node is populated with a value, that value needs to be displayed as a watermark.

Thanks,
Rich.

Hi Rich,

It does not matter to Aspose.Word where your watermark comes from. The most important thing you need to decide is how the watermark is represented in the document.

If the watermark is text, you probably need to insert a textbox into the header or footer and position it on the page appropriately and then have a merge field or a bookmark inside that text box. Then you can use DocumentBuilder to navigate to the place and insert your watermark text there. Similar thing if you want to insert a watermark image.