Presentation
概述
Presentation 是 Aspose.Slides FOSS 中用于 Java 的类。继承自:IPresentation。
表示一个 PowerPoint 演示。
此类提供 30 个方法,用于在 Java 程序中处理 Presentation 对象。可用的方法包括:Presentation、asIPresentationComponent、close、dispose、getCommentAuthors、getCurrentDateTime、getDocumentProperties、getFirstSlideNumber、getImages、getLayoutSlides、getMasters、getNotesSize,以及另外 6 个方法。安装 Aspose.Slides FOSS for Java 包后,所有公共成员对任何 Java 应用程序均可访问。属性:commentAuthors、currentDateTime、documentProperties、firstSlideNumber、images、layoutSlides,以及另外 5 项。
属性
| 名称 | 类型 | 访问 | 描述 |
|---|---|---|---|
presentation | IPresentation | 读取 | 获取演示文稿。 |
currentDateTime | LocalDateTime | 读取 | 获取当前日期时间。 |
documentProperties | IDocumentProperties | 读取 | 获取文档属性。 |
commentAuthors | ICommentAuthorCollection | 读取 | 获取评论作者。 |
slides | ISlideCollection | 读取 | 获取幻灯片。 |
notesSize | INotesSize | 读取 | 获取备注的大小。 |
layoutSlides | IGlobalLayoutSlideCollection | 读取 | 获取布局幻灯片。 |
masters | IMasterSlideCollection | 读取 | 获取 masters。 |
images | IImageCollection | 读取 | 获取图像。 |
sourceFormat | SourceFormat | 读取 | 获取源格式。 |
firstSlideNumber | int | 读取 | 获取第一张幻灯片的编号。 |
方法
| 签名 | 描述 |
|---|---|
Presentation() | 创建一个包含一张幻灯片的新空白演示文稿。 |
Presentation(path: String) | 从给定的文件路径打开演示文稿。 |
Presentation(in: InputStream) | 从给定的输入流打开演示文稿。 |
save(path: String) | 仅将列出的幻灯片索引保存到流中,使用带选项的格式 |
save(stream: OutputStream) | |
getPresentation() → IPresentation | 返回演示文稿。 |
getCurrentDateTime() → LocalDateTime | 返回当前日期时间。 |
setCurrentDateTime(value: LocalDateTime) | 设置当前日期时间值。 |
getDocumentProperties() → IDocumentProperties | 返回文档属性。 |
getCommentAuthors() → ICommentAuthorCollection | 返回评论作者。 |
getSlides() → ISlideCollection | 返回幻灯片。 |
getNotesSize() → INotesSize | 返回备注大小。 |
getLayoutSlides() → IGlobalLayoutSlideCollection | 返回布局幻灯片。 |
getMasters() → IMasterSlideCollection | 返回母版。 |
getImages() → IImageCollection | 返回图像。 |
getSourceFormat() → SourceFormat | 返回源格式。 |
getFirstSlideNumber() → int | 返回第一张幻灯片的编号。 |
setFirstSlideNumber(value: int) | 设置第一张幻灯片编号的值。 |
asIPresentationComponent() → IPresentationComponent | 返回演示文稿为 IPresentationComponent |
save(path: String, format: SaveFormat) | |
save(stream: OutputStream, format: SaveFormat) | |
save(path: String, format: SaveFormat, options: ISaveOptions) | |
save(stream: OutputStream, format: SaveFormat, options: ISaveOptions) | |
save(path: String, slides: int[], format: SaveFormat) | |
save(path: String, slides: int[], format: SaveFormat, options: ISaveOptions) | |
save(stream: OutputStream, slides: int[], format: SaveFormat) | |
save(stream: OutputStream, slides: int[], format: SaveFormat, options: ISaveOptions) | |
save(options: ISaveOptions) | 在 FOSS 版中未实现 — 在运行时抛出。 |
dispose() | 释放演示使用的所有资源 |
close() | 关闭演示并释放资源 |