Textbox with slide number (723)

Hi,

I have a specific presentation which has a textbox containing slide number. If you, for example, duplicate any slide, the number in the textbox will be changed. How can I determine if the particular textbox contains slide number using Aspose.Slides?


Thanks,
Zeljko


Hi Zeljko,


I have observe your requirements. We are looking into this and will get back to you with feedback soon.

Best Regards,

Hi Zeljko,


I have observe your comments. I have shared code snippet with you. I like to inform that You may use PlaceholderType.SlideNumber property. This will help you to achieve your requirements. Please share feedback with us if there is still an issue.


IShape shape = (IShape)tmp0.next();

if ((shape.getPlaceholder() != null) && (shape.getPlaceholder().getType() == PlaceholderType.SlideNumber))

{

// Do something

}

Best Regards,

Hi Muhammad,


Thank you for the code snippet. Unfortunately, it doesn’t work for me, as shape.getPlaceholder() returns null.

Here’s the code to confirm this using the file attached in my previous post:

String path = “SlideNumberInTextBox.pptx”;
Presentation presentation = new Presentation(path);
ISlide slide = presentation.getSlides().get_Item(0);
IShape shape = slide.getShapes().get_Item(0);
System.out.println(shape.getPlaceholder() == null);

Output:

true

Is there anything else I can do?

Regards,
Zeljko

Hi Zeljko,


I have observed your comments. We are looking into this and will get back to you with feedback soon.

Best Regards,

Hi Zeljko,


I have shared piece of code in a text file with you. This will help you to achieve your requirements. Please share feedback with us if there is still an issue.

Best Regards,