Free Support Forum - aspose.com

[JAVA]Exception

Hello!

I use aspose to convert html to powerpoint.

if i put some paragraphs to a shape with special characters like:
^!?§$%&/()=?´*?-:;><^q,.-#+´}][{²³?
or
!?§$%&/()=?´?>?%&§$/()???jioglse??#<>jhgd>>

after that i need the real height of the shape.
i have tried
1. int h = shape1.getHeight();
2. int h = shape1.getTextFrame().getHeight();

but in both cases i got an error message:
testOneFeatureBosch(de.cx30.slides.test.SlideTest)java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.RangeCheck(ArrayList.java:507)
at java.util.ArrayList.get(ArrayList.java:324)
at com.aspose.slides.Portions.get(SourceFile:33)
at com.aspose.slides.cS.if(SourceFile:116)
at com.aspose.slides.cS.else(SourceFile:159)
at com.aspose.slides.cS.(SourceFile:100)
at com.aspose.slides.cS.do(SourceFile:272)
at com.aspose.slides.co.do(SourceFile:118)
at com.aspose.slides.co.(SourceFile:100)
at com.aspose.slides.TextFrame.else(SourceFile:695)
at com.aspose.slides.Shape.new(SourceFile:939)
at com.aspose.slides.Rectangle.new(SourceFile:184)
at com.aspose.slides.Shape.getHeight(SourceFile:672)
at de.cx30.slides.Generator.getFoFieldContent(Generator.java:361)
at de.cx30.slides.Generator.getFoBoxLayout(Generator.java:261)
at de.cx30.slides.Generator.getFoLayout(Generator.java:246)
at de.cx30.slides.Generator.getFoBoxLayout(Generator.java:257)
at de.cx30.slides.Generator.getFoLayout(Generator.java:246)
at de.cx30.slides.Generator.generate(Generator.java:186)
at de.cx30.slides.test.SlideTest.testOneFeatureBosch(SlideTest.java:74)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at de.cx30.slides.test.AllTests.main(AllTests.java:25)


any idea?

Looks like you added Paragraph without Portions to a TextFrame.
Each paragraph must have at least one Portion.