国产PPT格式控件Spire.Presentation功能演示:在Java中将 ODP 转换为 PDF

Spire.Presentation for Java 专业的 PowerPoint API,它允许开发人员在 Java 应用程序中创建、读取、写入、转换和保存 PowerPoint 文档,而无需安装 Microsoft PowerPoint。

点击此处下载最新版测试。

将 ODP 转换为 PDF

可以按照下面列出的步骤使用 Spire.Presentation for Java 以简单快捷的方式将 ODP 转换为 PDF。

  • 创建一个演示对象。
  • 使用Presentation.loadFromFile()方法加载示例 ODP 文档。
  • 使用Presentation.saveToFile()方法将文档保存为 PDF 。
import com.spire.presentation.*;public class ODPtoPDF {    public static void main(String[] args) throws Exception {        //Create a Presentation instance        Presentation presentation = new Presentation();        //Load a sample ODP file        presentation.loadFromFile("toPDF.odp",FileFormat.ODP);        //Save it as PDF        presentation.saveToFile("output/Result.pdf", FileFormat.PDF);    }}

原始文件:

国产PPT格式控件Spire.Presentation功能演示:在Java中将 ODP 转换为 PDF

生成的文件:

国产PPT格式控件Spire.Presentation功能演示:在Java中将 ODP 转换为 PDF

是E-iceblue官方友好合作伙伴,如果您对spire.Presentation感兴趣,可以联系在线客服了解具体授权价格和使用机制。

标签:

声明:本站部分文章及图片源自用户投稿,如本站任何资料有侵权请您尽早请联系jinwei@zod.com.cn进行处理,非常感谢!

上一篇 2021年10月6日
下一篇 2021年10月6日

相关推荐

发表回复

登录后才能评论