Hello,
Hi Jaume,
I have observed your requirement and suggest you to please try using following modified code on your end to extract all text from master slide.
public static void ExtractMasterText()
{
Presentation presentation=new Presentation(“C:\Aspose Data\Test.pptx”);
IMasterSlideCollection masterSlide = presentation.getMasters();
if (null != masterSlide)
{
for(IMasterSlide sl : masterSlide)
{
for (IShape shape : sl.getShapes())
{
// System.out.println("-- -2- Shape “+ shape.getClass().getName());
//if (shape.getPlaceholder() != null)
if (shape instanceof IAutoShape)
{
// System.out.println(”-- – -- PlaceHolder: ["+shape.getPlaceholder().getType()+"]");
// if (shape.getPlaceholder().getType() == PlaceholderType.Header || shape.getPlaceholder().getType() == PlaceholderType.Footer ) {
ITextFrame tfn = ((IAutoShape) shape).getTextFrame();
if (tfn != null && !tfn.getText().isEmpty())
{
// System.out.println("-- – -- Text MASTERSLIDE ["+tfn.getText()+"]");
IParagraphCollection paras = tfn.getParagraphs();
for(IParagraph parag : paras)
{
System.out.println("Para text: "+parag.getText());
// processParagraphEx(parag, markCharacters, segmentationConditions, segmentationExceptions, presentation);
}
}
// }
}
}
}
}
}
I hope the shared information will be helpful.
Many Thanks,