Watermark applied on the pdf is not visible in the FreeBSD

In freeBSD, watwermark is applied on the pdf but it is not visible on the file. Tried Helvetica, Courier, NewsGoth BT Bold. It was worked in windows but facing issue in the freeBSD. What could be the reason ? Can anybody help to debug or find the solution for this issue. I have attached the file which was watermark applied pdf file. Applied watermark text is “Confidential”
test-card-6.pdf (109.0 KB)



Please share following details and we’ll investigate this scenario:

  • Watermark code
  • Output files/PDF
  • Watermark API version that you are using
  • FreeBSD and JRE/JDK versions


  1. Below is the watermark code
package com.sample.test;

import java.awt.Color;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.nio.file.Files;
import java.nio.file.Paths;

import com.groupdocs.watermark.Watermarker;
import com.groupdocs.watermark.common.FileType;
import com.groupdocs.watermark.common.HorizontalAlignment;
import com.groupdocs.watermark.common.VerticalAlignment;
import com.groupdocs.watermark.options.PresentationWatermarkSlideOptions;
import com.groupdocs.watermark.options.WatermarkOptions;
import com.groupdocs.watermark.options.WordProcessingLockType;
import com.groupdocs.watermark.options.WordProcessingWatermarkPagesOptions;
import com.groupdocs.watermark.watermarks.Font;
import com.groupdocs.watermark.watermarks.FontStyle;
import com.groupdocs.watermark.watermarks.TextAlignment;
import com.groupdocs.watermark.watermarks.TextWatermark;

public class WatermarkTest {

    public static void main(String[] args) throws IOException {
    	WatermarkTest w = new WatermarkTest();

    public void maskUnstructured() throws IOException {
    	try (InputStream source = getClass().getResourceAsStream("/test-card-6.pdf");
                ByteArrayOutputStream target = new ByteArrayOutputStream()) {
            	try (Watermarker w = new Watermarker(source); target) {
                    WatermarkOptions extraOps = toWatermarkOptions(w);
                    TextWatermark tw = new TextWatermark("Confidential", new Font("Courier", 90F, FontStyle.Regular));
                    Color c = Color.decode("#FF0000");
                            c.getRed(), c.getGreen(), c.getBlue()));
                    if (null == extraOps) {
                    } else {
                    	w.add(tw, extraOps);
            	Files.write(Paths.get("watermarked.pdf"), target.toByteArray());

    private WatermarkOptions toWatermarkOptions(Watermarker w) {
        FileType fileType = w.getDocumentInfo().getFileType();
        if (FileType.DOC.equals(fileType) || FileType.DOCX.equals(fileType)) {
            WordProcessingWatermarkPagesOptions options = new WordProcessingWatermarkPagesOptions();
            return options;
        } else if (FileType.PPT.equals(fileType) || FileType.PPTX.equals(fileType)) {
            PresentationWatermarkSlideOptions options = new PresentationWatermarkSlideOptions();
            return options;
        return null;
  1. Watermark API version 20.5

  2. FreeBSD 14.0-RELEASE-p5 and JDK version is 17

This issue is under investigation. We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.


You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.
We’ll let you know if any further details are required.