Friday, 29 May 2020 03:11

Java insert image watermark to presentation slides

Written by  support iceblue
Rate this item
(0 votes)

We have introduced how to use Spire.Presentaion for Java to add text watermark to PowerPoint document. This article will demonstrate how to add image watermark to presentation slides in java applications.

Firstly view the sample PowerPoint document:

Java insert image watermark to presentation slides

import com.spire.presentation.*;
import com.spire.presentation.drawing.*;
import javax.imageio.ImageIO;

public class addImageWatermark {

    public static void main(String[] args) throws Exception {
        //Create a PowerPoint document.
        Presentation presentation = new Presentation();

        //Load the file from disk.

        //Get the image you want to add as image watermark.
        File file =new File("logo.png");
        IImageData image = presentation.getImages().append(;

        //Set the properties of SlideBackground, and then fill the image as watermark.

        String result = "addImageWatermark.pptx";
        //Save to file.
        presentation.saveToFile(result, FileFormat.PPTX_2013);

Effective screenshot after adding image watermark to PowerPoint document:

Java insert image watermark to presentation slides

Additional Info

  • tutorial_title: