Hi,
I have simple presentation with slide number added on notes page. For .pptx file, slide number shape is detected as placeholder of type PlaceholderType.SlideNumber. For .ppt file, this shape isn’t detected as placeholder.
Here’s the code I use:
String presentationPath = “NotesSlideNumber.pptx”;
InputStream inputStream = new FileInputStream(presentationPath);
Presentation presentation = new Presentation(inputStream);
inputStream.close();
ISlide slide = presentation.getSlides().get_Item(0);
INotesSlide notesPage = slide.getNotesSlideManager().getNotesSlide();
IShapeCollection shapes = notesPage.getShapes();
IShape shape = shapes.get_Item(2);
System.out.println("isPlaceholder: " + shape.isTextHolder());
if (shape.isTextHolder()) {
System.out.println("PlaceholderType: " + shape.getPlaceholder().getType());
}
IAutoShape autoShape = (IAutoShape) shape;
System.out.println("Shape text: " + autoShape.getTextFrame().getText());
Here’s the output in case of .pptx file:
isPlaceholder: true
PlaceholderType: 5
Shape text: 1
Here’s the output in case of .ppt file:
isPlaceholder: false
Shape text: 1
I’m using Aspose.Slides for Java 16.8.0.
Can you check this?
Thanks,
Zeljko
Zeljko