[Java] Setting the PowerPoint Document Property MarkAsFinal as True

Mark as Final means that the presentation slide is the final edition and the author doesn’t want anyone to edit or change the content inside. With Free Spire.Presentation for Java, we can protect the presentation slides by setting the document property MarkAsFinal as true. This article will share the Java code used to mark a PowerPoint document as final.


Method 1: Download the Free Spire.Presentation for Java and unzip it. Then add the Spire.Presentation.jar file to your project as dependency.

Method 2: You can also add the jar dependency to maven project by adding the following configurations to the pom.xml.


Java Code:

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();

        //Set the document property MarkAsFinal as true
        presentation.getDocumentProperty().set("_MarkAsFinal", true);

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



Comments (1)

Edidiong Asikpo's photo

Amazing. Thanks for sharing.