PPT PPTX ODP POT ppsx
Aspose.Slides  for Java
PPS

Java を使用して PPS プロパティを編集します

独自の Java アプリを構築して、サーバー側 API を使用してプレゼンテーション ファイルの組み込みおよびカスタム プロパティを変更します。

Java 経由で PPS プロパティを変更します

Aspose.Slides for Java を使用すると、開発者は組み込みプロパティとカスタム プロパティの値にアクセスして変更できます。開発者は、プレゼンテーション オブジェクトによって公開される DocumentProperties プロパティを使用して、プレゼンテーション ファイルのドキュメント プロパティにアクセスできます。

PPS 組み込みプロパティの変更 - Java


Presentation pres = new Presentation("Presentation.pps");
try {
    // Create a reference to IDocumentProperties object associated with Presentation
    IDocumentProperties dp = pres.getDocumentProperties();
    
    // Set the built-in properties
    dp.setAuthor("Aspose.Slides for Java");
    dp.setTitle("Modifying Presentation Properties");
    dp.setSubject("Aspose Subject");
    dp.setComments("Aspose Description");
    dp.setManager("Aspose Manager");
    
    // Save your presentation to a file
    pres.save("DocProps.pps", SaveFormat.Pps);
} finally {
    if (pres != null) pres.dispose();
}

カスタム プロパティを PPS - Java に追加


Presentation pres = new Presentation();
try {
    // Getting Document Properties
    IDocumentProperties dProps = pres.getDocumentProperties();
    
    // Adding Custom properties
    dProps.set_Item("New Custom", 12);
    dProps.set_Item("My Name", "Aspose Metadata Editor");
    dProps.set_Item("Custom", 124);
    
    // Getting property name at particular index
    String getPropertyName = dProps.getCustomPropertyName(2);
    
    // Removing selected property
    dProps.removeCustomProperty(getPropertyName);
    
    // Saving presentation
    pres.save("CustomDemo.pps", SaveFormat.Pps);
} finally {
    if (pres != null) pres.dispose();
}

Java 経由で PPS のメタデータを抽出する方法

これらは、PPS ファイルからメタデータを抽出する手順です。

  1. PPS ファイルへのパスを使用してプレゼンテーション クラスをインスタンス化する

  2. プレゼンテーションに関連付けられた DocumentProperties オブジェクトを取得する

  3. DocumentProperties オブジェクト内のアイテムをループする

  4. カスタム プロパティへのアクセスと変更

サポートされているその他のメタデータ形式

Java を使用すると、他の多くの形式のメタデータを操作することもできます。