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.