Is there a way to get the images in a document?

I am writing a script to convert text documents to markdown. But having some difficulty to get the images embedded in the document.

The ToMarkdown() method would only output an empty ![]() image tag for png/jpg images with or w/o bBase64Img as true, and wouldn’t output anything for emf/wmf images.

The output of the ToJSON() method have all the image info I need. It likes:

"blipFill": {
    "blip": [],
    "srcRect": {
        "b": 100,
        "l": 17.407,
        "r": 92.267,
        "t": 67.151
    },
    "tile": null,
    "stretch": null,
    "rotWithShape": null,
    "rasterImageId": "image16.png",
    "type": "blipFill"
},

For png/jpg images, I could read the image file from the docx file using the rasterImageId. But for emf/wmf images, the file names in the JSON file are ended with .svg:

"blipFill": {
    "blip": [],
    "srcRect": null,
    "tile": null,
    "stretch": null,
    "rotWithShape": null,
    "rasterImageId": "display6image2.svg",
    "type": "blipFill"
},

Could anyone tell me how to get those svg files?
Thanks.

Hello @riverprawn

What is the version of used Document Builder? If possible, please share the document with these images so that we can check out this description. By the way, how did you add those image to the document?

The document is: test_with_embedded_images_zh.docx

The version of Document Builder is 8.1.0

The document was converted from a doc file using OnlyOffice 8.1.0. And the original file was not created by me. After reading the document.xml in the document, I think the image was created by Visio 6 and embedded as an OLEObject:

<o:OLEObject DrawAspect="Content" r:id="rId8" ObjectID="_1525040" ProgID="Visio.Drawing.6" ShapeID="_x0000_i0" Type="Embed"></o:OLEObject>```

Both the converted and original document can be displayed in OnlyOffice Desktop 8.1.0 and Document Server 8.0.1.31 without any problem.

Thank for sharing document. What is your final goal? Do you want to simply get images from the document to save locally on PC?