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
Thanks,
Zeljko