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

Free Support Forum - aspose.com

Slides - Not enough data to convert to- expected XY bytes but got only XYZ free bytes

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 which may rely on images - i checked the aspose site for this and it may be related to ticket IMAGING-34174.



Caused by: org.apache.camel.RuntimeCamelException: class com.aspose.slides.p6a2feef8.pbdb106a0.k: Not enough data to convert to, expected 35400 bytes but got only 8850 free bytes
Parameter name: outputData
com.aspose.ms.pbdb106a0.pf4dd765c.pbdb106a0.a.do(Unknown Source)
com.aspose.ms.pbdb106a0.pf4dd765c.p7cce53cf.pf4dd765c.an.do(Unknown Source)
com.aspose.ms.pbdb106a0.pf4dd765c.p7cce53cf.pf4dd765c.l.do(Unknown Source)
com.aspose.ms.pbdb106a0.pf4dd765c.p7cce53cf.pf4dd765c.l.do(Unknown Source)
com.aspose.ms.pbdb106a0.pf4dd765c.bl.do(Unknown Source)
com.aspose.ms.pbdb106a0.pf4dd765c.ar.do(Unknown Source)
com.aspose.ms.pbdb106a0.pf4dd765c.ar.do(Unknown Source)
com.aspose.ms.pbdb106a0.pf4dd765c.bj.for(Unknown Source)
com.aspose.ms.pbdb106a0.pf4dd765c.bj.do(Unknown Source)
com.aspose.ms.pbdb106a0.pf4dd765c.bj.do(Unknown Source)
com.aspose.ms.pbdb106a0.pf4dd765c.bj.int(Unknown Source)
com.aspose.ms.pbdb106a0.pf4dd765c.p7cce53cf.pa2137a2a.pbdb106a0.pf4dd765c.n.do(Unknown Source)
com.aspose.ms.pbdb106a0.pf4dd765c.ar.do(Unknown Source)
com.aspose.ms.pbdb106a0.pf4dd765c.ar.do(Unknown Source)
com.aspose.ms.pbdb106a0.pf4dd765c.p7cce53cf.pa2137a2a.pbdb106a0.pf4dd765c.m.do(Unknown Source)
com.aspose.ms.pbdb106a0.pf4dd765c.p7cce53cf.pa2137a2a.ac.do(Unknown Source)
com.aspose.ms.pbdb106a0.pf4dd765c.bl.do(Unknown Source)
com.aspose.ms.pbdb106a0.pf4dd765c.ar.do(Unknown Source)
com.aspose.ms.pbdb106a0.pf4dd765c.ar.do(Unknown Source)
com.aspose.ms.pbdb106a0.pf4dd765c.bj.for(Unknown Source)
com.aspose.ms.pbdb106a0.pf4dd765c.bj.do(Unknown Source)
com.aspose.ms.pbdb106a0.pf4dd765c.bj.do(Unknown Source)
com.aspose.ms.pbdb106a0.pf4dd765c.bj.int(Unknown Source)
com.aspose.ms.pbdb106a0.p2cbca448.a.read(Unknown Source)
javax.imageio.ImageReader.read(ImageReader.java:940)
com.aspose.slides.p6a2feef8.pf4dd765c.pbdb106a0.pbdb106a0.pf4dd765c.a.do(Unknown Source)
com.aspose.slides.p6a2feef8.pf4dd765c.pbdb106a0.pbdb106a0.pf4dd765c.a.try(Unknown Source)
com.aspose.slides.p6a2feef8.pbdb106a0.p6a2feef8.b.do(Unknown Source)
com.aspose.slides.p6a2feef8.pbdb106a0.p6a2feef8.b.(Unknown Source)
com.aspose.slides.p6a2feef8.pbdb106a0.p6a2feef8.b.(Unknown Source)
com.aspose.slides.p883e881b.am.do(Unknown Source)
com.aspose.slides.ImageCollection.do(Unknown Source)
com.aspose.slides.ImageCollection.addImage(Unknown Source)
com.aspose.slides.arv.do(Unknown Source)
com.aspose.slides.arw.if(Unknown Source)
com.aspose.slides.arw.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”);
masterSlide.getBackground().setType(BackgroundType.OwnBackground);
masterSlide.getBackground().getFillFormat().setFillType(FillType.Solid);
masterSlide.getBackground().getFillFormat().getSolidFillColor().setColor(Color.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");

masterSlide.getBackground().setType(BackgroundType.OwnBackground);
masterSlide.getBackground().getFillFormat().setFillType(FillType.Solid);
masterSlide.getBackground().getFillFormat().getSolidFillColor().setColor(Color.WHITE);
}
}

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

File tempFile = File.createTempFile(“mls-temp-”, “.pdf”);
tempFile.deleteOnExit();
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,

Thanks for inquiring Aspose.Slides.

I 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 you.

Many Thanks,

issue can be closed - file was corrupt.

sorry for the troubles.
Helge Rennicke