Master Slides Text Extraction From Shapes In Form Of Placeholder (2125)

Hello,

I am writing about the problem we encountered in working with MSO PowerPoint document using the Aspose Slides for Java library (v21.10). We are using Ubuntu 22.04 LTS and OpenJDK 11.0.13.

We want to extract text from master slides, but only from shapes generated by user. If shape is added by default or if shape in form of placeholder is added by user, we can check it using isTextHolder() (true - means it is not suitable for extraction). However, we cannot check if the text value of shape in form of placeholder is created/modified by user, and if so, we would need it extracted.

I have read the issue (Master Slides text extraction) and have not found the solution.

In the attachment you can find pptx file with user modified content (“Here is my Master Slide title” and “And my Master Slide Subtitle”) which are supposed to be extracted but cannot be checked for extraction using provided method (isTextHolder()).

Is there any way for solving this? Can you help me?

Thank you.

Regards!
Aleksandar

master slide test.zip (25.9 KB)

@zpredojevic,
The two shapes on the normal slide are placeholders defined from the slide layout. If I understand correctly, you would like to check if their contents are different from the shape contents on the slide layout. Could you please confirm?

No, there is no problem with normal slides. Please do not take them into consideration. I need a mechanism for detection whether the shape content in master-layout slide is generated by default or by user. If I iterate through shapes in master-layout slides I am supposed to use isTextHolder() method to check if it is generated by default (returns true). If the user modified the content of shape (in form of placeholder), isTextHolder() still returns true, even it is not default value. Is there any way to check master-layout shapes and determine whether or not they are generated by user (including the case when user edits the default placeholder)?

Thank you.

Regards!
Aleksandar

@zpredojevic,
Thank you for the additional information. If I understand correctly, there are two separate cases you want to detect:

  • text in a default placeholder on a master/layout slide was modified by user
  • an additional placeholder was added to a master/layout slide by user

Or are you only interested in the first case?

There is a way to determine whether an additional placeholder (shape) is added by user using isTextHolder() (if so, false is returned). I am interested in first case (check if a text in a default placeholder on a master/layout slide was modified by user).

@zpredojevic,
Thank you for the explanation. Unfortunately, I was unable to find such an ability in Aspose.Slides 22.7. I’ve added a ticket with ID SLIDESJAVA-38869 to our issue tracking system. Our development team will consider implementing such a feature. You will be notified when the issue is resolved.