Hi,
we are using Aspose.Words.17.6 and have a problem with drawings… I have this little document, which is basically a WORD document with a diagram in it. When trying to save it, aspose fails with
System.InvalidCastException
HResult=0x80004002
Message=Unable to cast object of type 'Aspose.Words.Drawing.GroupShape' to type 'Aspose.Words.Drawing.Shape'.
Source=Aspose.Words
StackTrace:
at .(ShapeBase , )
at .(ShapeBase , )
at .(ShapeBase , )
at .(ShapeBase , )
at .(ShapeBase , , Boolean )
at .(ShapeBase , )
at .(ShapeBase , )
at .(ShapeBase , )
at .(ShapeBase , )
at .(ShapeBase )
at .VisitShapeStart(Shape )
at Aspose.Words.Drawing.Shape.r3ka8zscesabkstb24kjjv9sml9wq7pw (DocumentVisitor )
at Aspose.Words.CompositeNode.AcceptCore(DocumentVisitor visitor)
at Aspose.Words.Drawing.Shape.Accept(DocumentVisitor visitor)
at Aspose.Words.CompositeNode.AcceptChildren(DocumentVisitor visitor)
at Aspose.Words.CompositeNode.AcceptCore(DocumentVisitor visitor)
at Aspose.Words.Paragraph.Accept(DocumentVisitor visitor)
at Aspose.Words.CompositeNode.AcceptChildren(DocumentVisitor visitor)
at Aspose.Words.CompositeNode.AcceptCore(DocumentVisitor visitor)
at Aspose.Words.Drawing.Shape.Accept(DocumentVisitor visitor)
at .(ShapeBase )
at .(ShapeBase )
at .VisitShapeEnd(Shape )
at Aspose.Words.Drawing.Shape.r3ka8zscesabkstb24kjjv9sml9wq7pw (DocumentVisitor )
at Aspose.Words.CompositeNode.AcceptCore(DocumentVisitor visitor)
at Aspose.Words.Drawing.Shape.Accept(DocumentVisitor visitor)
at Aspose.Words.CompositeNode.AcceptChildren(DocumentVisitor visitor)
at Aspose.Words.CompositeNode.AcceptCore(DocumentVisitor visitor)
at Aspose.Words.Paragraph.Accept(DocumentVisitor visitor)
at Aspose.Words.CompositeNode.AcceptChildren(DocumentVisitor visitor)
at Aspose.Words.CompositeNode.AcceptCore(DocumentVisitor visitor)
at Aspose.Words.Body.Accept(DocumentVisitor visitor)
at .(CompositeNode )
at .()
at . ()
at .()
at .()
at . ( )
at . ( )
at Aspose.Words.Document.( , SaveOptions )
at Aspose.Words.Document.(Stream , String , SaveOptions )
at Aspose.Words.Document.Save(Stream stream, SaveOptions saveOptions)
at Aspose.Words.Document.Save(Stream stream, SaveFormat saveFormat)
at AsposeGroupShape.Program.Main(String[] args) in c:\users\ducka\documents\visual studio 2017\Projects\AsposeGroupShape\AsposeGroupShape\Program.cs:line 18
I have already ungrouped everything in this drawing in WORD but it still fails. I will attach the Program and the file. AsposeGroupShape.zip (42.5 KB)