Unable to clone slide

In an attempt to have a drop in fix for Unable to write out presentation ,

we attempted to upgrade to aspose-slides-2.2.0-20100328.jar, we get the following error earlier in the presentation generation while trying to clone one of the slides. The exception is:

com.aspose.slides.PptEditException: Slide cloning error. at
com.aspose.slides.Presentation.cloneSlide(SourceFile:1525) at

Caused by:
java.awt.HeadlessException at sun.awt.HeadlessToolkit.getScreenResolution(HeadlessToolkit.java:203)
at com.aspose.slides.TextLayout.measureString(SourceFile:1125) at
com.aspose.slides.TextLayout.layoutText(SourceFile:255) at
com.aspose.slides.TextLayout.(SourceFile:126) at com.aspose.slides.TextFrame.new(SourceFile:728) at
com.aspose.slides.Shape.char(SourceFile:2150) at com.aspose.slidesRectangle.char(SourceFile:205) at
com.aspose.slides.Shape.boolean(SourceFile:2276) at
com.aspose.slides.Presentation.if(SourceFile:3300) at com.aspose.slides.Slide.do(SourceFile:523) at
com.aspose.slides.Presentation.do(SourceFile:1450) at
com.aspose.slides.Presentation.cloneSlide(SourceFile:1521) …

This happens regardless if we set java.awt.Headless to true or false.

This worked with a previous version of the library ( 1.9.3.2 ) but now breaks.

Any thoughts?

Thanks in advance for your help.


Hi Eugene,

Can you please share the source presentation file along with the code snippet for further investigation? This way I will be able to reproduce the issue on my end and help you out further.

Thanks and Regards,