Free Support Forum - aspose.com

ArgumentOutOfRangeException: Shape width cannot be less than 0

I have the following code (C#):

var wordDoc = new Aspose.Words.Document(SourceFile.FileName, new LoadOptions { LoadFormat = FileLoadFormat, WarningCallback = new HandleDocumentWarnings(this) });

wordDoc.Save(tempDocFileName, SaveFormat.Doc);

-> Calling the save function causes an exception:

System.ArgumentOutOfRangeException: Shape width cannot be less than 0.
Parameter name: value
at ? .(ShapeBase , Double , Boolean , String )
at Aspose.Words.Drawing.ShapeBase.(Double , Boolean )
at ? .(ShapeBase , ? , Boolean )
at ? .(ShapeBase , ? , Boolean )
at ? .(ShapeBase , ? , Boolean )
at ? .(ShapeBase , ? , Boolean )
at ? . (ShapeBase )
at ? .VisitGroupShapeStart(GroupShape )
at Aspose.Words.Drawing.GroupShape.r3ka8zscesabkstb24kjjv9sml9wq7pw?? (DocumentVisitor )
at Aspose.Words.CompositeNode.AcceptCore(DocumentVisitor visitor)
at Aspose.Words.Drawing.GroupShape.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 Aspose.Words.CompositeNode.AcceptChildren(DocumentVisitor visitor)
at Aspose.Words.CompositeNode.AcceptCore(DocumentVisitor visitor)
at Aspose.Words.Section.Accept(DocumentVisitor visitor)
at Aspose.Words.CompositeNode.AcceptChildren(DocumentVisitor visitor)
at Aspose.Words.CompositeNode.AcceptCore(DocumentVisitor visitor)
at Aspose.Words.Document.Accept(DocumentVisitor visitor)
at ? .(? )
at Aspose.Words.Document.(Stream , String , SaveOptions )
at Aspose.Words.Document.Save(String fileName, SaveOptions saveOptions)

@JonathanDL,

Thanks for your inquiry. Please ZIP and attach your input Word document here for testing. We will investigate the issue on our side and provide you more information.

formulairecomplter.zip (58.2 KB)

See attached ZIP with Word docx inside

@JonathanDL,

Thanks for sharing the document. We have tested the scenario using latest version of Aspose.Words for .NET 17.9 and have not found the shared issue. Please use Aspose.Words for .NET 17.9. We have attached the output DOC file with this post for your kind reference. output.zip (37.7 KB)