We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

errors:Index was outside the bounds of the array

Dear friends.

Convert DOC to PDF With Aspose.Words for .NET 15.9.0(https://downloads.aspose.com/words/net ),an exception is throw:Index was outside the bounds of the array.

(1)The converted codes is as follows:

Aspose.Words.Document doc = new Aspose.Words.Document(inputName);
doc.Save(outputName, Aspose.Words.SaveFormat.Pdf);

(2)The detail exception is as follows:

Index was outside the bounds of the array.
at .( [] , Int32[] )
at .(​ )
at ​ ..ctor(​ , , IWarningCallback )
at ​ .(​ , Shape , )
at ​ .(​ , , Boolean )
at ​ .(​ , , Boolean )
at ​ .(​ , Boolean )
at .( )
at ​ .()
at .​ ()
at ​ . ()
at . ()
at .()
at .( , Int32 )
at .( )
at .( )
at .( , Int32 )
at .( , Int32 , Boolean )
at .()
at .( , Int32 , Boolean , Boolean )
at .( , Boolean )
at .( )
at .( , Int32 , Boolean )
at .()
at .( , Int32 , Boolean , Boolean )
at . ()
at .( , Int32 )
at .( )
at .()
at .( )
at .(Boolean )
at .()
at .(Document , )
at Aspose.Words.Document.(Boolean )
at .( , )
at . ( )
at Aspose.Words.Document.( , SaveOptions )
at Aspose.Words.Document.(Stream , String , SaveOptions )

(3)The file is attached.

Hi Yuan,

Thanks for your inquiry. I have tested the scenario and have managed to reproduce the same issue at my side. For the sake of correction, I have logged this problem in our issue tracking system as WORDSNET-12570. I have linked this forum thread to the same issue and you will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

Hi Yuan,

Thanks for your patience. It is to inform you that our product team has completed the work on this issue (WORDSNET-12570)
and has come to a conclusion that this issue and the
undesired behavior you’re observing is actually not a bug in
Aspose.Words. So, we have closed this issue as ‘Not a Bug’. We are quoting developer’s comments here for your reference.

*The source document contains a corrupted shape definition (represented as two purple lines on the page 9). Aspose.Words just throw an exception since the document structure is out of specification.

W3 VML specs reference: http://www.w3.org/TR/NOTE-VML
MSDN VML reference https://docs.microsoft.com/en-us/windows/win32/vml/msdn-online-vml-introduction

Please remove this faulty shape (i.e. two puprle lines on the page 9) and render this document to Pdf. If you want us to implement the code which removes this shape while rendering, please let us know.

Hi Tahir Manzoor,

Thanks for your hard work,I convert the document to Pdf successful when I remove the corrupted shape.

Hi Yuan,

Thanks for your feedback. We have closed this issue as ‘Not a Bug’.

Please feel free to ask if you have any question about Aspose.Words, we will be happy to help you.