Hello,
i am trying to test the aspose slides for java example.
The example works perfectly, but in the console is a stacktrace displayed.
The stacktrace must written to the console with “System.out.print…”, the catch of the example is not called.
Can you please remove this output, otherwise the log file of my application will be full?
Code from the example:
/**
* @param args
*/
public static void main(String[] args)
{
try
{
//Instantiate a Presentation object that represents a PPT file
Presentation pres=new Presentation();
//Adding an empty slide to the presentation and getting the reference of
//that empty slide
Slide slide=pres.addEmptySlide();
//Do some work on the slide
//Writing the presentation as a PPT file
pres.write(new FileOutputStream(new File("C:\\temp\\demo.ppt")));
}
catch(Exception ex)
{
System.out.println("Fehler:" + ex.toString());
}
}
Exceptions:
java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
at java.util.ArrayList.RangeCheck(ArrayList.java:507)
at java.util.ArrayList.get(ArrayList.java:324)
at com.aspose.slides.Paragraphs.get(SourceFile:44)
at com.aspose.slides.Slide.do(SourceFile:230)
at com.aspose.slides.Presentation.do(SourceFile:1492)
at com.aspose.slides.Presentation.cloneSlide(SourceFile:1639)
at com.aspose.slides.Presentation.addEmptySlide(SourceFile:2465)
at x.x.buildPresentationModule.controllers.test1.main(test1.java:35)
java.lang.IndexOutOfBoundsException: Index: 5, Size: 5
at java.util.ArrayList.RangeCheck(ArrayList.java:507)
at java.util.ArrayList.get(ArrayList.java:324)
at com.aspose.slides.Paragraphs.get(SourceFile:44)
at com.aspose.slides.Slide.do(SourceFile:230)
at com.aspose.slides.Presentation.do(SourceFile:1492)
at com.aspose.slides.Presentation.cloneSlide(SourceFile:1639)
at com.aspose.slides.Presentation.addEmptySlide(SourceFile:2465)
at x.x.buildPresentationModule.controllers.test1.main(test1.java:35)
java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
at java.util.ArrayList.RangeCheck(ArrayList.java:507)
at java.util.ArrayList.get(ArrayList.java:324)
at com.aspose.slides.Paragraphs.get(SourceFile:44)
at com.aspose.slides.Slide.do(SourceFile:230)
at com.aspose.slides.Presentation.do(SourceFile:1492)
at com.aspose.slides.Presentation.cloneSlide(SourceFile:1639)
at com.aspose.slides.Presentation.addEmptySlide(SourceFile:2465)
at x.x.buildPresentationModule.controllers.test1.main(test1.java:35)
java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
at java.util.ArrayList.RangeCheck(ArrayList.java:507)
at java.util.ArrayList.get(ArrayList.java:324)
at com.aspose.slides.Paragraphs.get(SourceFile:44)
at com.aspose.slides.Slide.do(SourceFile:230)
at com.aspose.slides.Presentation.do(SourceFile:1492)
at com.aspose.slides.Presentation.cloneSlide(SourceFile:1639)
at com.aspose.slides.Presentation.addEmptySlide(SourceFile:2465)
at x.x.buildPresentationModule.controllers.test1.main(test1.java:35)
java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
at java.util.ArrayList.RangeCheck(ArrayList.java:507)
at java.util.ArrayList.get(ArrayList.java:324)
at com.aspose.slides.Paragraphs.get(SourceFile:44)
at com.aspose.slides.Slide.do(SourceFile:230)
at com.aspose.slides.Presentation.do(SourceFile:1492)
at com.aspose.slides.Presentation.cloneSlide(SourceFile:1639)
at com.aspose.slides.Presentation.addEmptySlide(SourceFile:2465)
at x.x.buildPresentationModule.controllers.test1.main(test1.java:35)
Thanks for help
vland