Hi
Thanks for your request. Unfortunately, the issue is still
unresolved. We will let you know once it is fixed.
As a temporary workaround, I can only suggest remove Shape
and DrawingML nodes with unknown image types. Please see the code below:
Document doc = new Document(@"Test001\test.docx");
// Get all shapes.
Node[] shapes =
doc.GetChildNodes(NodeType.Shape, true).ToArray();
foreach (Shape shape in
shapes)
{
// Remove all shapes with unknown image format.
if (shape.ImageData != null
&& shape.ImageData.ImageType == ImageType.Unknown)
shape.Remove();
}
// Do the same for DrawingML.
Node[] dmls =
doc.GetChildNodes(NodeType.DrawingML, true).ToArray();
foreach (DrawingML dml in
dmls)
{
// Remove all shapes with unknown image format.
if (dml.ImageData != null
&& dml.ImageData.ImageType == ImageType.Unknown)
dml.Remove();
}
doc.Save(@"Test001\out.docx");
Best regards,