if I insert a watermark into a document and then save it as a pdf. The watermark is not displayed in the document. When saving the document as .doc all looks well.
This is how I insert the watermark:
// Create a watermark shape. This will be a WordArt shape.
Shape watermark = new Shape(document, ShapeType.TEXT_PLAIN_TEXT);
// Set up the text of the watermark.
// Text will be directed from the bottom-left to the top-right corner.
// Remove the following two lines if you need a solid black text.
// Place the watermark in the page center.
// Create a new paragraph and append the watermark to this paragraph.
Paragraph watermarkPara = new Paragraph(document);
Is there anything wrong with this code?
Thanks for your request. The problem occurs because Aspose.Words for Java does not support rendering of WordArt shapes.
As a workaround, you can insert watermark as an image. In this case it will look correct. You can find code examples here:
Hope this helps. Please let me know if you need more assistance, I will be glad to help you.