new Presentation().getSlides().get_Item(0).getShapes().addAutoShape(ShapeType.Rectangle, 100, 100, 200, 200).getTextFrame().getParagraphs().addFromHtml("<span style=“font-size: small;”>Test</span>");
class com.aspose.slides.exceptions.InvalidOperationException: Can’t parse coordinate.
at com.aspose.slides.internal.k5.i.else(Unknown Source)
at com.aspose.slides.ajk.do(Unknown Source)
at com.aspose.slides.ajk.do(Unknown Source)
at com.aspose.slides.qv.do(Unknown Source)
at com.aspose.slides.qs.if(Unknown Source)
at com.aspose.slides.qs.do(Unknown Source)
at com.aspose.slides.ParagraphCollection.addFromHtml(Unknown Source)
at com.aspose.slides.ParagraphCollection.addFromHtml(Unknown Source)
The same method invocation with"<span style=“font-size: small;”>Test</span>" succeeds!
I have used following sample code on my end using Aspose.Slides for Java 18.9 and have not been able to reproduce the issue. I suggest you to please try using following sample code.
I checked the code I included in the post, and it has somehow removed the escape \ before the " in the string. The string tested should be “<span style=\“font-size: small;\”>Test</span>”
(To post a String in the forum it is apparently necessary to add s double \ to show up as a single one)
In your example there are the wrong type of quotes “ and ” instead of "
I have now included the relevant part of the code with correct quotes as an attachment. snippet.java.zip (748 Bytes)
We would appreciate if you could run your test again. (It fails with us with the stack trace given before)
I also noted that the case that runs with us without an error has font-size: 8; instead of font-size: small;
I have observed the information shared by you and have been able to observe the issue specified. An issue with ID SLIDESJAVA-37381 has been created in our issue tracking system to further investigate and resolve the issue. This thread has been linked with the issue so that you may be notified once the issue will be fixed.