We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Watermark - PDF/Word difference

Hello, I found edge case which shows PDF and Word watermark support is different.
When we set exactly the same color for page background and for watermark in PDF it will become invisible but word performs some logic which makes it visible.

Here is minimal code to reproduce this issue:

Document doc = new Document();
Color value = new Color(191, 191, 191);
doc.setPageColor(value);
TextWatermarkOptions options = new TextWatermarkOptions();
options.setColor(value);
doc.getWatermark().setText("ASAP", options);

doc.save("a.docx");
doc.save("a.pdf");

@ANDREA.FARRIS Aspose.Words behavior is correct. Watermark in MS Word document is inserted into the document’s header. When you open DOCX document in MS Word, it displays the document header a little lighter then the main content. That is why watermark is visible. But if you convert your document to PDF or enter to header/footer editing in MS Word, it will disappear since it has the same color as the background. Here is PDF produced by MS Word: ms.pdf (9.4 KB)