Hello,
We are developping a aplication to extract all kind of text from a pptx file. The application works fine with all text, except for the text inside de masters slides.
This is the snipet that we use for that kind of slides:
IMasterSlideCollection masterSlide = presentation.getMasters();
if (null != masterSlide) {
for(IMasterSlide sl : masterSlide)
{
// sl.
for (IShape shape : sl.getShapes()) {
System.out.println("-- -2- Shape “+ shape.getClass().getName());
if (shape.getPlaceholder() != null) {
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)
{
processParagraphEx(parag, markCharacters, segmentationConditions, segmentationExceptions, presentation);
}
}
// }
}
}
}
}
As Attachment are the original pptx file were are using.
May you help us how to do it?
Sincerely,
AT