1

I need to fetch the images adress in word document along with text and tables. Using doc.element.body loop I can't get image recognise, using doc.part.rels.values loop I can only get images. If suggest if there any way to extract the text , tables, images in same order as in source document.

1
  • Please provide enough code so others can better understand or reproduce the problem. Commented Apr 22 at 18:51

1 Answer 1

0

In python-docx there is no direct access to images in the document structure. To extract text, tables, or images in the original order, you have to parse the XML tree manually (doc.element.body.iter()), checking for tags like w:p for paragraphs, w:tbl for tables, and w:drawing or w:pict for images.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.