Free Support Forum - aspose.com

Adding multi-line watermark in Word

Hello,

How to add a multi-line watermark in word document with Aspose.Word for java 4.0.2. ?

Thanks.

Hi

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thanks for your inquiry. Just use code like the following:

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

insertWatermarkText(doc, "first line\nsecond line");

doc.save("C:\\Temp\\out.doc");

You can find insertWatermark method here:

http://www.aspose.com/documentation/java-components/aspose.words-for-java/howto-add-a-watermark-to-a-document.html

Best regards.