Update the Program Name Field in PPTX Properties in Java

I want to update the “program name” property value in .pptx properties using java.

Current: “program name” :“Aspose.Slides for Java”
updated to : “program name” :“”

please suggest how to update

@veeru.sit

To remove the “program name” property, specifically “Aspose.Slides for Java,” from the properties of a .pptx file using Java, you can follow these steps:

  1. Load the Presentation: First, you need to load the existing presentation file.
  2. Access Document Properties: Retrieve the document properties associated with the presentation.
  3. Remove the Property: Use the appropriate method to remove the specific property by its name.
  4. Save the Presentation: Finally, save the modified presentation.

Here’s a sample code snippet demonstrating how to achieve this:

import com.aspose.slides.IDocumentProperties;
import com.aspose.slides.Presentation;
import com.aspose.slides.SaveFormat;

public class RemoveProgramNameProperty {
    public static void main(String[] args) {
        // Path to the presentation file
        String dataDir = "Your Document Directory";
        
        // Load the presentation
        Presentation presentation = new Presentation(dataDir + "YourPresentation.pptx");
        
        // Access the document properties
        IDocumentProperties documentProperties = presentation.getDocumentProperties();
        
        // Remove the "program name" property if it exists
        String propertyName = "Aspose.Slides for Java";
        if (documentProperties.get_Item(propertyName) != null) {
            documentProperties.removeCustomProperty(propertyName);
        }
        
        // Save the modified presentation
        presentation.save(dataDir + "ModifiedPresentation.pptx", SaveFormat.Pptx);
    }
}

In this code:

  • Replace "Your Document Directory" with the actual path to your documents.
  • Replace "YourPresentation.pptx" with the name of your presentation file.
  • The code checks if the property exists before attempting to remove it, ensuring that you don’t encounter any errors.

This approach will effectively remove the specified property from your PowerPoint presentation. If you have any further questions or need additional assistance, feel free to ask!

Sources:
[1]: Add Custom Document Properties in Java Slides | Aspose.Slides …

@veeru.sit,
Please refer to the API Limitations of Aspose.Slides for Java. Aspose has long maintained a policy that does not allow changing certain fields of document metadata. This policy is documented, and we cannot change this behavior. We apologize for any inconvenience caused.

Hi,

The issue is still not resolved. The Program Name property is a built-in property.

Please find the attachment for reference. Let me know if you need any further details.

Is there any way to update this property value “Program name”?

I have tried to run default method clearBuiltInProperties()

clearCustomProperties()

Also

setNameOfApplication("")

May be while saving the file updated the default value.

Please let me know how to resolved this

image.png (31.3 KB)

@veeru.sit,

No, Aspose.Slides does not allow to change this property.

Hi,
Thanks for the confirmation.

As of now, am using free license.
After getting the Aspose license, is there any way to update the Program name property value as empty.
“Program name” : “Aspose.Slides for Java”
to
“Program name” : “”

Please suggest.

@veeru.sit,
Aspose.Slides for Java with a license does not allow updating the “Program name” field either.