News Category

Java protect presentation slides by setting the property with mark as final

2019-11-19 08:25:39 Written by  support iceblue
Rate this item
(0 votes)

Mark as Final means that the presentation slide is final edition and the author doesn’t want any changes on the document. With Spire.Presentation for Java, we can protect the presentation slides by setting the password. This article demonstrates how to mark a presentation as final by setting the document property MarkAsFinal as true.

import com.spire.presentation.FileFormat;
import com.spire.presentation.Presentation;

public class MarkAsFinal {
    public static void main(String[] args) throws Exception {

        //Create a PPT document and load file
        Presentation presentation = new Presentation();
        presentation.loadFromFile("Sample.pptx");
       
        //Set the document property MarkAsFinal as true
        presentation.getDocumentProperty().set("_MarkAsFinal", true);

        //Save the document to file
        presentation.saveToFile("output/MarkasFinal.pptx", FileFormat.PPTX_2010);
    }
}

Effective screenshot after mark as final for presentation:

Java protect presentation slides by setting the property with mark as final

Additional Info

  • tutorial_title:
Last modified on Thursday, 02 September 2021 06:04