How Do I Know If the Shape in a Presentation is AutoShape or PictureFrame in Python?

Also, please let me know why when i use shape.texframe i am able to extract only some text whereas while using slides.util.SlideUtil.get_all_text_boxes(presentation.slides[slide_num]) i am able to get all text data.

@jwala.vaishnavi2412,
Thank you for posting the questions.

You can check if a shape in a PowerPoint presentation is an AutoShape or PictureFrame like this:

import aspose.slides as slides

with slides.Presentation("sample.pptx") as presentation:
    first_slide = presentation.slides[0]

    # check the first shape
    if isinstance(first_slide.shapes[0], slides.AutoShape):
        print("The shape is AutoShape.")

    # check the second shape
    if isinstance(first_slide.shapes[1], slides.PictureFrame): 
        print("The shape is PictureFrame.")

The shape.text_frame property returns a text frame object from the shape object only. The slides.util.SlideUtil.get_all_text_boxes method returns all text boxes from the specified slide.