We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Incorrect Underline Type


In the attached presentation I have three portions of text. First and third portion are underlined (first with Single, third with Double underline type). Second portion is not underlined. When I get the underline type of the second portion, the result is -1, which is TextUnderlineType.NotDefined, but it should be TextUnderlineType.None, right?

Here’s the code I used:

String presentationPath = “AsposeUnderline.pptx”;

InputStream stream = new FileInputStream(presentationPath);

Presentation presentation = new Presentation(stream);


ISlide slide = presentation.getSlides().get_Item(0);

IAutoShape shape = (AutoShape) slide.getShapes().get_Item(0);

ITextFrame textFrame = shape.getTextFrame();

IParagraph paragraph = textFrame.getParagraphs().get_Item(0);
IPortion underlinedPortion1 = paragraph.getPortions().get_Item(0);
IPortion noUnderlinedPortion = paragraph.getPortions().get_Item(1);
IPortion underlinedPortion2 = paragraph.getPortions().get_Item(2);
System.out.println(underlinedPortion1.getText() + "Underline Type: " + underlinedPortion1.getPortionFormat().getFontUnderline());
System.out.println(noUnderlinedPortion.getText() + "Underline Type: " + noUnderlinedPortion.getPortionFormat().getFontUnderline());
System.out.println(underlinedPortion2.getText() + "Underline Type: " + underlinedPortion2.getPortionFormat().getFontUnderline());

Can you check this?


Hi Zeljko,

Thank you for posting.

I have observed your comments and like to share with you that I am discussing this with our product team and I will get back to you with our findings.

Best Regards,

Hi Zeljko,

I have worked with the presentation file shared by you and have been able to observe the issue specified. An issue with ID SLIDESJAVA-35137 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 automatically notified once the issue will be fixed.

We are sorry for your inconvenience,

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

This message was posted using Notification2Forum from Downloads module by Aspose Notifier.


I downloaded the latest Aspose.Slides update (15.11.0) and I’m still able to reproduce the same issue.

Can you check this?

Thank you,

Hi Zeljko,

Thank you for getting back to us.

We have investigated the issue reported by you and we will like to share with you that,
TextUnderlineType.None - Specific value means that the line will not be displayed.
TextUnderlineType.NotDefined - This means that the local value (specific value) for this portion of text is not defined and value will be inherited from default formatting of current paragraph or from current text style of slide.

I hope this will clarify the concept. Please share if I may help you further in this regard.

Best Regards,