图片如果是MathType公式应满足是OLE对象类型图片,ProgId应包含"Equation."
// 图片是否是MathType公式 [7/19/2021 Administrator]
public static bool IsMathTypeShape(Aspose.Words.Drawing.Shape shape)
{
if (shape.ShapeType == ShapeType.OleObject
&& shape.OleFormat != null
&& !string.IsNullOrWhiteSpace(shape.OleFormat.ProgId)
&& Regex.IsMatch(shape.OleFormat.ProgId.ToLower(), @"equation."))
{
return true;
}
return false;
}