package com.aspose.slides.examples.Presentation.Properties;

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

public class AccessingAndModifyingCustomProperties {

	public static void main(String[] args) {
		
		// The path to the documents directory.
        String dataDir = Utils.getDataDir(AccessingAndModifyingCustomProperties.class);
        
		Presentation pres = new Presentation(dataDir + "Presentation.pptx");

		// Create a reference to DocumentProperties object associated with
		// Presentation
		IDocumentProperties dp = pres.getDocumentProperties();

		// Access and modify custom properties
		for (int i = 0; i < dp.getCount(); i++) {
			// Display names and values of custom properties
			System.out.println("Custom Property Name : " + dp.getPropertyName(i));
			System.out.println("Custom Property Value : " + dp.get_Item(dp.getPropertyName(i)));

			// Modify values of custom properties
			dp.set_Item(dp.getPropertyName(i), "New Value " + (i + 1));
		}

		// Save your presentation to a file
		pres.save(dataDir + "CustomDemoModified.pptx", SaveFormat.Pptx);

	}

}

@@ -367,16 +367,17 @@
         
+%09
 String d
@@ -597,21 +597,16 @@
 ted with
-%0A%09%09//
  Present

Update AccessingAndModifyingCustomProperties.java