I am trying to read a .pptx file using python-pptx
. I managed to get all the content except the image from the presentation. Below is the code i used to identify images other than textframes in the presentation. After identifying i am getting the auto_shape_type
as RECTANGLE (1)
but nothing about the image.
from pptx import Presentation
from pptx.shapes.picture import Picture
def read_ppt(file):
prs = Presentation(file)
for slide_no, slide in enumerate(prs.slides):
for shape in slide.shapes:
if not shape.has_text_frame:
print(shape.auto_shape_type)
Any help on understanding this problem appreciated. Alternative options are also welcome.