Presentation

Presentation — Aspose.Slides FOSS for Java API Reference

BoundingBoxExtent Presentation class は PowerPoint の作成、読み込み、保存のためのルートオブジェクトです .pptx Aspose.Slides FOSS for Java のファイルです。実装しています IPresentation.

BoundingBoxExtent: org.aspose.slides.foss

import org.aspose.slides.foss.*;
public class Presentation implements IPresentation

BoundingBoxExtent

IPresentation -> Presentation


BoundingBoxExtent

BoundingBoxExtentBoundingBoxExtent
Presentation()1枚のスライドがある新しい空白のプレゼンテーションを作成します。.
Presentation(String path)指定されたファイルパスからプレゼンテーションを開きます。.
Presentation(InputStream in)指定された入力ストリームからプレゼンテーションを開きます。.

BoundingBoxExtent:

import org.aspose.slides.foss.*;

// Create a new empty presentation
Presentation prs = new Presentation();

// Open an existing PPTX file
Presentation prs2 = new Presentation("deck.pptx");

// Load from a stream
InputStream stream = new FileInputStream("deck.pptx");
Presentation prs3 = new Presentation(stream);

BoundingBoxExtent

BoundingBoxExtentBoundingBoxExtentBoundingBoxExtentBoundingBoxExtent
getSlides()ISlideCollectionBoundingBoxExtentプレゼンテーション内のスライドの順序付けられたコレクション。.
getMasters()IMasterSlideCollectionBoundingBoxExtentマスタースライドのコレクション。.
getLayoutSlides()IGlobalLayoutSlideCollectionBoundingBoxExtentすべてのマスターにまたがるすべてのレイアウトスライドのコレクション。.
getCommentAuthors()ICommentAuthorCollectionBoundingBoxExtentコメント作者のコレクション。.
getDocumentProperties()IDocumentPropertiesBoundingBoxExtentコア、アプリケーション、およびカスタムドキュメントメタデータ。.
getImages()IImageCollectionBoundingBoxExtentプレゼンテーションに埋め込まれたすべての画像のコレクション。.
getNotesSize()INotesSizeBoundingBoxExtentノートスライドのサイズ設定。.
getSourceFormat()SourceFormatBoundingBoxExtent読み込まれたプレゼンテーションソースの形式。.
getCurrentDateTime() / setCurrentDateTime(LocalDateTime)LocalDateTime読み取り/書き込み日付・時刻プレースホルダーに使用される日時。.
getFirstSlideNumber() / setFirstSlideNumber(int)int読み取り/書き込みプレゼンテーション内の最初のスライド番号。.

BoundingBoxExtent

save(String path)

プレゼンテーションをファイルに保存します(デフォルトは PPTX 形式)。.

BoundingBoxExtentBoundingBoxExtentBoundingBoxExtent
pathString宛先ファイルパス。.
prs.save("output.pptx");

save(OutputStream stream)

プレゼンテーションを出力ストリームに保存します。.

BoundingBoxExtentBoundingBoxExtentBoundingBoxExtent
streamOutputStream宛先ストリーム。.

save(String path, SaveFormat format)

指定された形式でプレゼンテーションをファイルに保存します。.

BoundingBoxExtentBoundingBoxExtentBoundingBoxExtent
pathString宛先ファイルパス。.
formatSaveFormat出力形式(例:., SaveFormat.PPTX).
prs.save("output.pptx", SaveFormat.PPTX);

save(OutputStream stream, SaveFormat format)

指定された形式でプレゼンテーションをストリームに保存します。.

save(String path, SaveFormat format, ISaveOptions options)

追加オプションを使用してプレゼンテーションをファイルに保存します。.

BoundingBoxExtentBoundingBoxExtentBoundingBoxExtent
pathString宛先ファイルパス。.
formatSaveFormat出力形式。.
optionsISaveOptions出力動作を制御する保存オプション。.

使用例

シェイプでプレゼンテーションを作成する

import org.aspose.slides.foss.*;

Presentation prs = new Presentation();
ISlide slide = prs.getSlides().get(0);
IAutoShape shape = slide.getShapes().addAutoShape(
    ShapeType.RECTANGLE, 50, 50, 300, 100);
shape.addTextFrame("Hello, Slides!");
prs.save("hello.pptx", SaveFormat.PPTX);

開く、検査する、再保存する

import org.aspose.slides.foss.*;

Presentation prs = new Presentation("existing.pptx");
System.out.println("Slides: " + prs.getSlides().size());
for (int i = 0; i < prs.getSlides().size(); i++) {
    ISlide slide = prs.getSlides().get(i);
    System.out.println("  Slide " + i + ": " + slide.getShapes().size() + " shapes");
}
prs.save("existing-updated.pptx", SaveFormat.PPTX);

ドキュメント プロパティを設定

import org.aspose.slides.foss.*;

Presentation prs = new Presentation();
prs.getDocumentProperties().setTitle("Q1 Results");
prs.getDocumentProperties().setAuthor("Finance Team");
prs.getDocumentProperties().setSubject("Quarterly Review");
prs.save("q1.pptx", SaveFormat.PPTX);

参照

 日本語