Good day,
I am running into a strange error where based on image content the pdf generated from a slide is malformed,
if I remove the images in the file attached and generate the pdf generated is completely fine,
however if I try to convert the document containing the images the pdf is malformed
in our software we are using the following method for this functionality
private void convertPptToPdf(InputStream is, OutputStream os) throws Exception {
Presentation pres = null;
log.debug(“Opening Stream”);
try {
pres = new Presentation(is);
} catch (Exception e) {
log.error(“Couldn’t open PowerPoint Document”);
throw e;
}
log.debug(“Saving”);
try {
pres.save(os, com.aspose.slides.SaveFormat.Pdf);
} catch(Exception e) {
log.error(“Couldn’t save PowerPoint Document to PDF”);
throw e;
}
log.debug(“PowerPoint conversion done”);
}
also on a side note, however not our main issue when doing bulk testing regarding enacting saves of these(literally just looping through and saving a few hundred), heap space errors will be thrown, only for slides containing these images, this does not occur every time, however has happened and can be replicated (a screenshot of the stack trace is also attached) this is thrown on the following line of code
log.debug(“Opening Stream”);
try {
pres = new Presentation(is);
} catch (Exception e) {
log.error(“Couldn’t open PowerPoint Document”);
throw e;
}
log.debug(“Saving”);
try {
pres.save(os, com.aspose.slides.SaveFormat.Pdf);
} catch(Exception e) {
log.error(“Couldn’t save PowerPoint Document to PDF”);
}
this issue occurs in aspose.slides-15.3.0-jdk16 as well as aspose.slides-15.9.0 for java
thank you