PPT
PPTX
ODP
POT
ppsx
PPTX
Java を使用して PPTX プロパティを編集します
独自の Java アプリを構築して、サーバー側 API を使用してプレゼンテーション ファイルの組み込みおよびカスタム プロパティを変更します。
Java 経由で PPTX プロパティを変更します
Aspose.Slides for Java を使用すると、開発者は組み込みプロパティとカスタム プロパティの値にアクセスして変更できます。開発者は、プレゼンテーション オブジェクトによって公開される DocumentProperties プロパティを使用して、プレゼンテーション ファイルのドキュメント プロパティにアクセスできます。
PPTX 組み込みプロパティの変更 - Java
Presentation pres = new Presentation("Presentation.pptx");
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.pptx", SaveFormat.Pptx);
} finally {
    if (pres != null) pres.dispose();
}
カスタム プロパティを PPTX - 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.pptx", SaveFormat.Pptx);
} finally {
    if (pres != null) pres.dispose();
}
Java 経由で PPTX のメタデータを抽出する方法
これらは、PPTX ファイルからメタデータを抽出する手順です。
PPTX ファイルへのパスを使用してプレゼンテーション クラスをインスタンス化する
プレゼンテーションに関連付けられた DocumentProperties オブジェクトを取得する
DocumentProperties オブジェクト内のアイテムをループする
カスタム プロパティへのアクセスと変更