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

Free Support Forum - groupdocs.app

GroupDocs.Watermark set text watermark to the bottom layer even when background prop is disabled

This issue only happens for Docx files, it does not happen for PDFs.

Here is a code snippet that I used to test this issue, I used the AddATextWatermark class from the GroupDocs Git repository and did a few changes to it, and I update the watermark lib to 21.3 because the project was using an older version.

	public static void run() {
    // Constants.InDocumentPdf is an absolute or relative path to your document. Ex: "C:\\Docs\\document.pdf"
    Watermarker watermarker = new Watermarker(Constants.InDocumentDocx);

    TextWatermark watermark = new TextWatermark("top secret", new Font("Arial", 36));
    watermark.setForegroundColor(Color.getRed());
    watermark.setHorizontalAlignment(HorizontalAlignment.Center);
    watermark.setVerticalAlignment(VerticalAlignment.Center);
    watermark.setRotateAngle(45);
    watermark.setBackground(false);

    watermarker.add(watermark);
    watermarker.save(Constants.OutDocumentDocx);

    watermarker.close();
}

SO: Windows 11
Java version: RedHat OpenJDK 11.0.15
GroupDocs.Watermark version: 21.3
Git Project: https://github.com/groupdocs-watermark/GroupDocs.Watermark-for-Java
Git Revision: fed5e7f

This topic has been moved to the related forum: https://forum.groupdocs.com/t/groupdocs-watermark-set-text-watermark-to-the-bottom-layer-even-when-background-prop-is-disabled/11864