We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Slides - Attempted to seek before start of MemoryStream

Hello there,

we are using Aspose.Total for Java released on 09-25-2014 on a linux
machine. For most of our conversions it seems to work very well - on
some of the slides we try to convert to pdf we get this an exception.

Caused by: class com.aspose.slides.p6a2feef8.pbdb106a0.p7cce53cf.ae: Attempted to seek before start of MemoryStream.
com.aspose.slides.p6a2feef8.pbdb106a0.p7cce53cf.ag.seek(Unknown Source)
com.aspose.slides.Presentation.do(Unknown Source)
com.aspose.slides.Presentation.for(Unknown Source)
com.aspose.slides.Presentation.if(Unknown Source)
com.aspose.slides.Presentation.(Unknown Source)
com.aspose.slides.Presentation.(Unknown Source)

Code used is not too special:
for(IMasterSlide masterSlide : presentation.getMasters()) {
if (BackgroundType.NotDefined == masterSlide.getBackground().getType()) {

log.warn(“there was no background defined on the master
'” + masterSlide.getSlideId() + “’ will set background to white”);
if (BackgroundType.Themed == masterSlide.getBackground().getType()) {
boolean isOverrideThemeEnabled = masterSlide.getThemeManager().isOverrideThemeEnabled();

log.warn(“there was themed background defined on the
master '” + masterSlide.getSlideId() + “’ and " + isOverrideThemeEnabled
+” -> will set background to white");


// update fields
// pres.getUpdateDateTimeFields();
com.aspose.slides.PdfOptions opts = new com.aspose.slides.PdfOptions();
opts.setWarningCallback(new SlidesWarningCallback("",""));

File tempFile = File.createTempFile(“mls-temp-”, “.pdf”);
presentation.save(tempFile.getAbsolutePath(), com.aspose.slides.SaveFormat.Pdf, opts);

System environment:

----Java System Properties----------------
java.vm.name: Java HotSpot™ 64-Bit Server VM
java.vm.vendor: Oracle Corporation
java.vm.version: 24.60-b09
java.runtime.name: Java™ SE Runtime Environment
java.runtime.version: 1.7.0_60-b19
os.name: Linux
os.arch: amd64
java.io.tmpdir: /tmp
file.encoding: UTF-8
sun.io.unicode.encoding: UnicodeLittle
sun.cpu.endian: little
Available processors (cores): 8
Free memory (bytes): 3813752616
Maximum memory (bytes): 8572502016
Total memory available to JVM (bytes): 4934348800

Hi Helge,

have observed the issue shared by you and request you to please share
the sample presentation along with working sample code that is
reproducing the issue on your end. Before this I suggest you to please
try using Aspose.Slides for Java 14.6.0 on your end as well. We will
investigate the issue further on our end based on information shared by

Many Thanks,

issue can be closed - file was corrupt.

sorry for the troubles.
Helge Rennicke