How to add watermark into JT file

Hi, we really want to add watermark into a JT file. What we need is: a Java program can take JT file as input, add watermark, then write out to a new JT file. Could anyone have sample code to fulfil this task?

Thanks,
Sean Lu

@seanxwlu

Add a watermark to a JT file with Aspose.3D for Java in three steps:

  1. Load the JT file
  2. Create a Watermark object, configure the text and appearance.
  3. Attach the watermark to the scene and save the result.
import com.aspose.threed.*;
import com.aspose.threed.watermark.*;

public class JtWatermark {
    public static void main(String[] args) throws Exception {
        // 1. Load the source JT file
        Scene scene = new Scene("input.jt");

        // 2. Build the watermark
        Watermark watermark = new Watermark();

        // Text to display
        String text = "CONFIDENTIAL";

        // Options – adjust as needed
        WatermarkOptions opts = new WatermarkOptions();
        opts.setFontSize(48);
        opts.setColor(java.awt.Color.RED);
        opts.setOpacity(0.3f);          // 0‑1 (transparent to opaque)
        opts.setRotationAngle(45);      // degrees
        opts.setHorizontalAlignment(HorizontalAlignment.Center);
        opts.setVerticalAlignment(VerticalAlignment.Center);

        // Add the text watermark
        watermark.addTextWatermark(text, opts);

        // 3. Apply the watermark to the scene and save
        scene.addWatermark(watermark);
        scene.save("output.jt", SaveOptions.createSaveOptions(SaveFormat.JT));
    }
}

What you need

Item Details
Aspose.3D for Java Latest version (e.g., 23.12 or newer).
License A valid Aspose.3D license file (otherwise the output will contain a trial watermark).
JDK Java 8 or higher.

Next steps

  1. Verify the Aspose.3D for Java version you are using. If it’s older than the current release, upgrade to get the latest JT support and watermark features.
  2. Run the snippet above, adjusting the WatermarkOptions to match the visual style you need.
  3. If you encounter any errors (e.g., “Unsupported format” or licensing issues), share the exact exception text, the library version, and a minimal JT file that reproduces the problem so we can diagnose further.

Thanks for quick reply. I tried your code segment, and have couple of unresolved methods/variables. (please see snapshot below)

image.png (140.1 KB)

Note: I download the latest version of aspose-3d Java package: aspose-3d-25.11.0.jar and aspose-3d-25.11.0-jdk8.jar

Thanks,
Sean Lu

Hi @seanxwlu

Thank you for reaching out to us. At this time, our product does not support exporting files in the JT format, so this functionality is not available. We understand how important this feature can be, and we’ll keep your request in mind as we plan future enhancements.

If there’s anything else we can assist you with or if you have alternative format requirements, please let us know—we’re happy to help.

Regards,
Lex Chou