Thanks for your interest in Aspose.Slides.
I have checked the code snippet provided by you and it is working fine. In my observation, the size of presentation that you are trying to write in the file is exceeding the heap size and causing a runtime exception. I can offer a suggestion that you need to increase your heap size. Please, follow the command line below and adjust the heap size values as per your requirements, while executing a java class file.
java -Xms -Xmx JavaApp
java -Xms32m -Xmx128m
Thanks and Regards,
Hi Kiran,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
Thanks for considering Aspose.Slides.
It is not possible to write PPT format to stream without preparing whole structure in the memory for Presnetation.write() method . So, increasing the heap size is the only solution for reading large presentations.
We are sorry for the inconvenience.