Extract text from PPT using Aspose.Slides for .NET

I am modifying an existing method that was extracting text using old Aspose.slide interface. But I can’t find any getPlaceholders() method for Islide and TextHolder is also unknown. Here is my code:

ISlide islide = srcPres.getSlides().get_Item(i);
// By shapes

// By plaseholder
for (int j = 0; j < islide.getPlaceholders().getCount(); j++) {
Placeholder holder = islide.getPlaceholders().get_Item(j);
if (holder instanceof TextHolder)
mpTHA.handleText(TS_PLACEHOLDER, ((TextHolder) holder).getText(), holder);
}
}

As mentioned above I can’t find any method getPlaceholders() for iSlide and TextHolder is also unknown. I am using aspose.slides API 18.5

@hporasl,

I have observed your comments. I have shared sample code with you. This will help you to achieve your requirements. Please share feedback with us if there is still an issue.

String path=“F:\Aspose Work\”;
Presentation presentation=new Presentation ();
ITextFrame[] textFramesPPTX = SlideUtil.getAllTextFrames(presentation, true);
for (int i = 0; i < textFramesPPTX.length; i++) {
for(IParagraph para : textFramesPPTX[i].getParagraphs()) {
for(IPortion port : para.getPortions()) {
System.out.print(port.getText());
// presentation.save(path+“rizwan.pptx”,SaveFormat.Pptx);