Aspose-slides-19.1.0 for java PPT文件转换pdf失败

test.zip (3.8 MB)
使用 aspose-diagram-19.1.0-jdk16.jar PPT文件转pdf失败,由于我们的许可证的有效期到2019-3-12 。所以想咨询一下新发布的版本是否解决,以此来决定是否升级许可证。

@gsh365,

我已遵守您的要求,并请您分享示例代码和发生在您端的探针。

代码如下:

// /


// / Ppt转成Pdf
// /

// / 源文件
// / 转档文件
public void PptConvertToPdf(String sourceFilePath, String pdfFilePath)
throws Exception {
try {
CheckPptLic();
// Presentation pre = new Presentation(sourceFilePath, new
// Aspose.Slides.LoadOptions(Aspose.Slides.LoadFormat.Ppt));
com.aspose.slides.Presentation pre = new com.aspose.slides.Presentation(
sourceFilePath);
pre.save(pdfFilePath, com.aspose.slides.SaveFormat.Pdf);
} catch (com.aspose.slides.PptxCorruptFileException cfex) {
throw new Exception(String.format(“文件损坏! {0}”, cfex.getMessage()));
} catch (com.aspose.slides.PptCorruptFileException cfe) {
throw new Exception(String.format(“文件损坏! {0}”, cfe.getMessage()));
} catch (com.aspose.slides.PptxUnsupportedFormatException fex) {
if (fex.getMessage()
.toLowerCase()
.indexOf(
“Encrypted presentations are not supported”
.toLowerCase()) >= -1) {
throw new Exception(“有密码!”);
} else {
throw new Exception(String.format(“文件格式无法识别! {0}”,
fex.getMessage()));
}
} catch (com.aspose.slides.PptUnsupportedFormatException fe) {
if (fe.getMessage().indexOf(
“Encrypted presentations are not supported”.toLowerCase()) >= -1) {
throw new Exception(“有密码!”);
} else {
throw new Exception(String.format(“文件格式无法识别! {0}”,
fe.getMessage()));
}
} catch (com.aspose.slides.PptxReadException prex) {
throw new Exception(String.format(“文件读取错误! {0}”, prex.getMessage()));
} catch (com.aspose.slides.PptReadException pre) {
throw new Exception(String.format(“文件读取错误! {0}”, pre.getMessage()));
} catch (com.aspose.slides.InvalidPasswordException ie) {
throw new Exception(“有密码”);
} catch (Exception ex) {
throw ex;
}

}

@gsh365,

我已经在末端使用了.NET 20.3的Aspose.Slides,但没有发现任何问题。 能否请您尝试使用指定版本。

请问java版的Aspose.Slides 20.3可以吗? 由于license原因,现在无法使用20.3测试,如果java版可以,我们这边会考虑升级license。

@gsh365,

当我分享这些内容时,我已经使用Aspose.Slides for Java 20.3进行了测试。 它可供下载和最新版本。 我们还将在下周为Java 20.4启动Aspose.Slides。