Hello, when I try to convert macro file for format potm/pptm/ppsm to pdf, it throws PptxReadException at new Presentation before save to pdf. Could you tell me why it cannot read correctly with macro in file for v21.8? How to avoid this problem if not upgrade the slide jar? thanks a lot!
Here is details :
OS: win 10
JVM: jre1.8.0_251,64-Bit
Java: version 1.8
sdk: aspose.slides-21.8
code sample:
File file = new File(fileDir);
if (file.isDirectory()) {
File[] files = file.listFiles();
for (File f : files) {
String name = f.getName();
System.out.println("file name: " + name);
pres = new Presentation(fileDir + name);
String saveName = outDir + name + ".pdf";
long beforSave = System.currentTimeMillis();
pres.save(saveName, SaveFormat.Pdf);
System.out.println("ppt to pdf save cost total:"+(System.currentTimeMillis()-beforSave)+"ms");
System.out.println("Document converted to pdf successfully. File saved at " + saveName);
}
System.out.printf("%s%10d%s", "time seconds: ", System.currentTimeMillis() - stMill, " ms ");
}
errors:
class com.aspose.slides.PptxReadException: Exception of type System.Exception was thrown. —>
class com.aspose.slides.internal.og.s: Exception of type System.Exception was thrown.
com.aspose.slides.internal.og.p.do(Unknown Source)
com.aspose.slides.internal.og.boolean.do(Unknown Source)
com.aspose.slides.internal.og.goto.do(Unknown Source)
com.aspose.slides.internal.og.goto.(Unknown Source)
com.aspose.slides.internal.og.w.int(Unknown Source)
com.aspose.slides.internal.og.w.(Unknown Source)
com.aspose.slides.internal.og.u.if(Unknown Source)
com.aspose.slides.internal.og.u.do(Unknown Source)
com.aspose.slides.internal.og.u.(Unknown Source)
com.aspose.slides.at2.do(Unknown Source)
com.aspose.slides.ag0.case(Unknown Source)
com.aspose.slides.ag0.do(Unknown Source)
com.aspose.slides.Presentation.if(Unknown Source)
com.aspose.slides.Presentation.do(Unknown Source)
com.aspose.slides.Presentation.do(Unknown Source)
com.aspose.slides.Presentation.do(Unknown Source)
com.aspose.slides.Presentation.(Unknown Source)
com.aspose.slides.examples.Presentation.PPTToPPTX.main(PPTToPPTX.java:40)
3 error files :
sample.7z (3.3 MB)