Slides - Probably DrawingContainer contains more DgContainer records

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.


Maybe not a bug but illegal input document?


Caused by: com.aspose.slides.PptReadException: Couldn’t read “PowerPoint Document” record.
at com.aspose.slides.pa5e0ff62.ls.byte(Unknown Source)
at com.aspose.slides.pa5e0ff62.ls.(Unknown Source)
at com.aspose.slides.aqp.do(Unknown Source)
at com.aspose.slides.Presentation.for(Unknown Source)
at com.aspose.slides.Presentation.if(Unknown Source)
at com.aspose.slides.Presentation.(Unknown Source)
at com.aspose.slides.Presentation.(Unknown Source)
at com.marketlogicsoftware.officeconverter.camel.CamelAsposeTypeConverter.toPresentation(CamelAsposeTypeConverter.java:568)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.camel.util.ObjectHelper.invokeMethod(ObjectHelper.java:1001)
… 42 more
Caused by: com.aspose.slides.p6a2feef8.pbdb106a0.ct: Couldn’t read [nn Start
Self: nn, Header:RecordHeader, Type:0x3EE [1006], Version:15, Instance:0, Length:0x0
nn End
]
at com.aspose.slides.pa5e0ff62.mj.do(Unknown Source)
at com.aspose.slides.pa5e0ff62.mj.do(Unknown Source)
at com.aspose.slides.pa5e0ff62.ls.do(Unknown Source)
… 55 more
Caused by: com.aspose.slides.p6a2feef8.pbdb106a0.ct: Couldn’t read [ba Start
Self: ba, Header:RecordHeader, Type:0x40C [1036], Version:15, Instance:0, Length:0x0
ba End
]
at com.aspose.slides.pa5e0ff62.mj.do(Unknown Source)
at com.aspose.slides.pa5e0ff62.mj.do(Unknown Source)
at com.aspose.slides.pa5e0ff62.af.do(Unknown Source)
at com.aspose.slides.pa5e0ff62.mi.do(Unknown Source)
… 58 more
Caused by: com.aspose.slides.p6a2feef8.pbdb106a0.ct: Probably DrawingContainer contains more DgContainer records.
at com.aspose.slides.pa5e0ff62.ba.do(Unknown Source)
at com.aspose.slides.pa5e0ff62.mi.do(Unknown Source)
… 62 more






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,

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