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

Free Support Forum - aspose.com

Text became underlined

Hi,

I opened the attached presentation, removed one portion of text and added another one to its place. When I opened the saved presentation, added portion became underlined even if I didn't set it via code.

Also, the size of added portion looks smaller than size of other portions, even if font size is the
same (22). What could be wrong here?

Here's the code I used:

String presentationPath = "Klinische_Forschung_Senti.pptx";

InputStream stream = new FileInputStream(presentationPath);

Presentation presentation = new Presentation(stream);

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

IAutoShape shape = (IAutoShape) slide.getShapes().get_Item(2);

IParagraph paragraph = shape.getTextFrame().getParagraphs().get_Item(0);

IPortion newPortion = new Portion("NewPortion");
paragraph.getPortions().removeAt(0);
paragraph.getPortions().insert(0, newPortion);

presentation
.save("Klinische_Forschung_Senti-aspose.pptx",
SaveFormat.Pptx);

Can you check this?

Thanks,
Zeljko

Hi Zeljko,


Thank you for posting.

I have observed your comments and worked with the presentation file shared by you. I have been able to reproduce the specified issue. A ticket with ID SLIDESJAVA-35182 has been logged 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 resolved.

We are sorry for your inconvenience,

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


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

Hi,


I switched to Aspose.Slides 16.1.0 and I’m still able to reproduce this issue.

Can you check this again?

Thanks,
Zeljko

Hi Zeljko,


Thank you for getting back to us.

I have observed your comments and like to request you to please try using following sample code on your end to serve the purpose. The new portion is created with default portion format. You can see this format in PowerPoint after “Clear All Formatting” (see screenshot.png).

IPortion newPortion = new Portion((Portion)paragraph.getPortions().get_Item(0));
newPortion.setText(“NewPortion”);

Please let us know if the issue persists. We will be glad to help you further.

Best Regards,