HI Attached files not converting to PDF.Please help.
package com.Aspose.example;
import com.aspose.ms.System.IO.FileNotFoundException;
import com.aspose.slides.PptException;
import com.aspose.slides.*;
public class slidesToPdf {
public static void main(String args[]) throws java.io.FileNotFoundException{
try {
//Instantiate a Presentation object that represents a PPT file
Presentation pptPresentation = new Presentation(“C:\Temp\SinglePDF\Standalone\Input\input.ppt”);
//Saving the presentation to PDF document
pptPresentation.save(“C:\Temp\Aspose\input.pdf”,com.aspose.slides.export.SaveFormat.PDF);
} catch (PptException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (FileNotFoundException e) {
//TODO Auto-generated catch block
e.printStackTrace();
}
}
Hi Anand,
Hey Mudassir,
I'm having the same issue with PPTX using Aspose.Slides 2.9.4.
Code:
import com.aspose.slides.Presentation;
import com.aspose.slides.export.SaveFormat;
import com.aspose.slides.pptx.PresentationEx;
PresentationEx pptxPresentation = new PresentationEx(source);
pptxPresentation.save(target, SaveFormat.PDF);
Error:
Caused by: java.lang.NullPointerException
at com.aspose.slides.obfuscated.brv.this(Unknown Source)
at com.aspose.slides.obfuscated.brv.for(Unknown Source)
at com.aspose.slides.obfuscated.brv.do(Unknown Source)
at com.aspose.slides.obfuscated.brv.if(Unknown Source)
... 69 more
Source file is attached, thank you!
Kind regards
Peter
Hi Peter,
Hi,
Could you please update whether the issue has been resolved?
Hi Anand,
Hi,
Could you please update on this issue?
We have a release this week using ASPOSE tool .It would be better if you fix this issue soon.Due to this issue our relase is getting delayed.
Thank you.\
--Anand
Hi Anand,
PresentationEx dest=new PresentationEx(path+“input.ppt”);dest.save(path+“input.pdf”, com.aspose.slides.export.SaveFormat.PDF);
Hi Mudassir,
I have used saveas option in pptx and saved the file as ppt.Does it mean that I should not do like this?I accept I should not rename the file but when I use save as option it should work right?
–Anand
Hi Anand,