Convert DOC to PDF With Aspose.Words for .NET 15.9.0(https://releases.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 )
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.
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: https://www.w3.org/TR/NOTE-VML.html
MSDN VML reference https://learn.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.