Result Ppt file- after text change- is broken

Using Java Aspose.Slides 7.7.0. PPT Api. When I attempt to change one of the Master slides of the presentation. After the change - I am unable to open ppt file - It is reported to be broken.
Code snippet that I use below, file is attached.

Presentation presentation = new Presentation(INPUT_PPT_FILE);
Slide masterSlide1 = presentation.getMasters().get_Item(0);
Shape firstShape = masterSlide1.getShapes().get_Item(0);
firstShape.getTextFrame().getParagraphs().get_Item(0).getPortions().get_Item(0).setText(CONTENT1);
presentation.save(OUTPUT_PPT_FILE, SaveFormat.Ppt);

Hi Andrey,

I have worked with the presentation file shared by you and have been able to observe the issue specified. An issue with ID SLIDESJAVA-34094 has been created in our issue tracking system to further investigate and resolve the issue. You need to use the following sample code to serve the purpose once the issue will be resolved.

public static void testMasterTextFrame()

{
String path=“D:\Aspose Data\”;
Presentation presentation = new Presentation(path+“original.ppt”);
Slide masterSlide1 = presentation.getMasters().get_Item(1);
int cnt=masterSlide1.getShapes().getCount();;
Shape firstShape = masterSlide1.getShapes().get_Item(1);

if(firstShape.getPlaceholder()!=null)
{
int type=firstShape.getPlaceholder().getPlaceholderType();
TextHolder txt=(TextHolder)firstShape.getPlaceholder();
txt.getParagraphs().get_Item(0).getPortions().get_Item(0).setText(“CONTENT1”);
// firstShape.getTextFrame().getParagraphs().get_Item(0).getPortions().get_Item(0).setText(“CONTENT1”);
presentation.save(path+“original_modified.ppt”, SaveFormat.Ppt);
}
}

We are sorry for your inconvenience,

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


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