Free Support Forum - aspose.com

PresentationObject issue with PDF byte stream


#1

Hi ,
Please clarify the below . We are getting bytearray of PDF and while I am creating presentionObject from that byte array, I am getting exception.
com.aspose.slides.PptUnsupportedFormatException: Unknown file format. —> class com.aspose.slides.internal.da.int: Unknown file format.

So I tried the below POC and getting the same issue . Please help on this.

public class IPSDownloadDocumentServiceDataProvider{

public Presentation getPresentationDocument() {
   try {
	File file = new File("C:\\Users\\Desktop\\response100.pdf");
	FileInputStream origFIS = new FileInputStream(file);
	Presentation pres = new Presentation(origFIS);
   }catch(Exception e){
   }	
	

}

}


#2

@BNYMellonITAMSoftwareOperations,

I have observed your comments and sample code. You are trying to load a PDF byte array using Aspose.Slides which is not supported. You need to load PDF using Aspose.PDF as Aspose.Slides only support PowerPoint presentation formats.