I am trying to save Power Point Presentation as PDF file. Unfortunately I am getting an error during this operation. Please see attached code and PPT file.
public static void main(String[] args)
{
try {
//Instantiate a Presentation object that represents a PPT file
Presentation pptPresentation = new Presentation("c:/temp/demo.ppt");
//Instantiate the PdfOptions class
com.aspose.slides.export.PdfOptions pdfOptions=new com.aspose.slides.export.PdfOptions();
//Set Jpeg Qualit
pdfOptions.setJpegQuality(90);
//Define behavior for metafiles
pdfOptions.setSaveMetafilesAsPng(true);
//Set Text Compression level
pdfOptions.setTextCompression(com.aspose.slides.export.PdfTextCompression.FLATE);
//Define the PDF standard
pdfOptions.setCompliance(com.aspose.slides.export.PdfCompliance.PDF_15);
//Save the prsentation to PDF with specified options
pptPresentation.save("c:/temp/demo.pdf", com.aspose.slides.export.SaveFormat.PDF,pdfOptions);
} catch (PptException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (FileNotFoundException e) {
//TODO Auto-generated catch block
e.printStackTrace();
}
}