Free Support Forum - aspose.com

Error cloning pptx slide -

Hello there

We are converting our existing ppt code to use the pptx APIs are finding a problem when duplicating a slide. here is the exception:

Exception in thread “main” java.lang.IllegalArgumentException: a:extLst
at com.aspose.slides.obfuscated.dx.byte(SourceFile:677)
at com.aspose.slides.obfuscated.dx.try(SourceFile:708)
at com.aspose.slides.obfuscated.bcw.do(SourceFile:15)
at com.aspose.slides.obfuscated.beb.void(SourceFile:63)
at com.aspose.slides.obfuscated.bcz.void(SourceFile:62)
at com.aspose.slides.obfuscated.bcz.void(SourceFile:62)
at com.aspose.slides.obfuscated.bcz.void(SourceFile:62)
at com.aspose.slides.obfuscated.bcz.void(SourceFile:62)
at com.aspose.slides.obfuscated.bcy.h(SourceFile:161)
at com.aspose.slides.pptx.PresentationEx.if(SourceFile:1515)
at com.aspose.slides.pptx.SlidesEx.if(SourceFile:99)
at com.aspose.slides.pptx.SlidesEx.insertClone(SourceFile:93)
at com.catalina.unittests.CloneTest.main(CloneTest.java:28)

We are usign the following test program to reproduce this problem (which is a copy of your existing sample code).

PresentationEx pres = new PresentationEx(“D:\VisualCrossing\templates\CCD_TTriangle.pptx”);
//Clone the desired slide to the end of the collection of slides in the same PPTX
SlidesEx slds = pres.getSlides();
slds.insertClone(0,pres.getSlides().get(0));
PresentationEx pres = new PresentationEx(“D:\VisualCrossing\templates\CCD_TTriangle.pptx”);
//Clone the desired slide to the end of the collection of slides in the same PPTX
SlidesEx slds = pres.getSlides();
slds.insertClone(0,pres.getSlides().get(0));
//Write the modified pptx to disk
pres.write(“D:\VisualCrossing\templates\CCD_TTriangle_out.pptx”);/Write the modified pptx to disk
pres.write(“D:\VisualCrossing\templates\CCD_TTriangle_out.pptx”);

I attach the above ppt which we are using for testing this.

Any thoughts as to what we are doing incorrectly?

Regards
Andrew

Hi Andrew,

I have worked with the presentation file shared by you and have observed the issue. An issue with ID 28199 has been created in our issue tracking system to further investigate and resolve the issue. This thread has also been linked with the same issue so that you may be automatically notified once the issue is resolved.

We are sorry for your inconvenience,

Thanks Mudassir

I notice that it seems to be specific to certain pptx files. Even if a fix would take a while, it would be very helpful if you could let me know what aspect of the pptx file is causing the problem then maybe I can workaround it.

Thanks again
Andrew

Hi Andrew,

I like to share that unfortunately at the moment we are unable to share the cause of the issue as our development team has scheduled the issue for initial investigation during 25th Week of 2011. We will share the further information with you after the initial investigation.

Thanks and Regards,

Hello,

I have the same problem with all demos which clone or replace something in *.pptx - Files.

Is it still scheduled for next week?

Thank you

Hi Christina,

Thanks for your interest in Aspose.Slides.

Can you please share the source presentation for which you have obtained the error. It may be that the nature of issue that you may be encountering is differen than what 28199 belongs to. I will really appreciate your cooperation for this.

Thanks and Regards,

Hello,

yes of course. I have tested a demo:

try {

// Instantiate PresentationEx class that represents PPTX
PresentationEx pres = new PresentationEx(“d:\pptx\welcomeJ.pptx”);

// Access first slide
SlideEx sld = pres.getSlides().get(0);

// Iterate through shapes to find the placeholder
for (int i = 0; i < sld.getShapes().size(); i++)

if (sld.getShapes().get(i).getPlaceholder() != null) {
ShapeEx shp = sld.getShapes().get(i);

// Change the text of each placeholder
((AutoShapeEx) shp).getTextFrame().setText(“This is Placeholder”);
}

// Write the PPTX to Disk
pres.write(“d:\pptx\welcome_PHJ.pptx”);

} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}

The source presentation is attached.

Thrown exception:

Exception in thread “main” java.lang.IllegalArgumentException: a:extLst
at com.aspose.slides.obfuscated.dx.byte(SourceFile:677)
at com.aspose.slides.obfuscated.dx.try(SourceFile:708)
at com.aspose.slides.obfuscated.bcw.do(SourceFile:15)
at com.aspose.slides.obfuscated.beb.void(SourceFile:63)
at com.aspose.slides.obfuscated.bcz.void(SourceFile:62)
at com.aspose.slides.obfuscated.bcz.void(SourceFile:62)
at com.aspose.slides.obfuscated.bcz.void(SourceFile:62)
at com.aspose.slides.obfuscated.bcz.void(SourceFile:62)
at com.aspose.slides.obfuscated.bcy.h(SourceFile:161)
at com.aspose.slides.pptx.PresentationEx.do(SourceFile:941)
at com.aspose.slides.pptx.PresentationEx.do(SourceFile:952)
at com.aspose.slides.pptx.PresentationEx.do(SourceFile:772)
at com.aspose.slides.pptx.PresentationEx.write(SourceFile:1209)
at com.aspose.slides.pptx.PresentationEx.write(SourceFile:1182)
at Template.main(Template.java:53)

Regards

Hello again,

and the second one:

try {

// Instantiate PresentatioEx class that represents a PPTX file
PresentationEx pres = new PresentationEx(“d:\pptx\helloworld.pptx”);

// Clone the desired slide to the end of the collection of slides in the same PPTX
SlidesEx slds = pres.getSlides();
slds.addClone(pres.getSlides().get(0));

// Write the modified pptx to disk
pres.write(“d:\pptx\helloworld_clonedJava.pptx”);

} catch (IOException e) {

// TODO Auto-generated catch block
e.printStackTrace();
}

This is also a demo. Presentation is also attached.

Thrown exception:

Exception in thread “main” java.lang.IllegalArgumentException: a:extLst
at com.aspose.slides.obfuscated.dx.byte(SourceFile:677)
at com.aspose.slides.obfuscated.dx.try(SourceFile:708)
at com.aspose.slides.obfuscated.bcw.do(SourceFile:15)
at com.aspose.slides.obfuscated.beb.void(SourceFile:63)
at com.aspose.slides.obfuscated.bcz.void(SourceFile:62)
at com.aspose.slides.obfuscated.bcz.void(SourceFile:62)
at com.aspose.slides.obfuscated.bcz.void(SourceFile:62)
at com.aspose.slides.obfuscated.bcz.void(SourceFile:62)
at com.aspose.slides.obfuscated.bcy.h(SourceFile:161)
at com.aspose.slides.pptx.PresentationEx.if(SourceFile:1515)
at com.aspose.slides.pptx.SlidesEx.if(SourceFile:99)
at com.aspose.slides.pptx.SlidesEx.addClone(SourceFile:73)
at CloneSlide.main(CloneSlide.java:39)

Regards

Hi Christina,

I have worked with the presentation files shared with the given code snippet and have observed the similar issues. I have updated the issue status with your set of presentations and will share the ETA with you as soon as it is investigated and scheduled by our development team.

Thanks and Regards,

The issues you have found earlier (filed as 28199) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.