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

Free Support Forum - aspose.com

Font size difference (726)

Hi,


I’ve loaded the attached presentation, changed text in some of the portions and saved the presentation. As you can see in the attached screenshot, font size has been changed from 52 to 51 pt which causes the text in the lower-left corner to move up a little bit.

Here’s the code I used:

String path = “Test.pptx”;

InputStream inputStream = new FileInputStream(path);

Presentation presentation = new Presentation(inputStream);

inputStream.close();

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

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

IParagraphCollection paragraphs = shape.getTextFrame().getParagraphs();

IParagraph paragraph = paragraphs.get_Item(1);

IPortionCollection portions = paragraph.getPortions();

IPortion portion = portions.get_Item(0);

portion.setText(“T_” + portion.getText());

paragraph = paragraphs.get_Item(2);

portions = paragraph.getPortions();

portion = portions.get_Item(0);

portion.setText(“T_” + portion.getText());

paragraph = paragraphs.get_Item(3);

portions = paragraph.getPortions();

portion = portions.get_Item(0);

portion.setText(“T_” + portion.getText());

presentation.save(“Test-aspose.pptx”, SaveFormat.Pptx);

Can you check this?

Thanks,
Zeljko

Hi Zeljko,

I have worked with presentation file shared by you using Aspose.Slides for JAVA 17.3.0 and able to observe the issue. A ticket with ID SLIDESJAVA-36209 has been created in our issue tracking system to further investigate and resolve the issue. This thread has been linked with issue so that you may be automatically notified once issue will be fixed.

We are sorry for your inconvenience,