Word DOCX to PDF Offline Conversion C# .NET | Avoid Index or Argument Out Of Range Exceptions

The doc causes IndexOutOfRange when is saved to PDF.

System.IndexOutOfRangeException: Index was outside the bounds of the array.
   at   . (​  )
   at   . (​  )
   at    (​  , ​  ,    )
   at   . (   , ​  , ​  , Stream,    , Boolean )
   at   .  ​  (Stream )
   at    . (Stream )
   at       ​ ()
   at   .   ​ (    )
   at    .   ​ (    )
   at    . (    )
   at   . ()
   at    ()
   at ​  .   ​  ()
   at    .   ​     )
   at    .   ​     )
   at Aspose.Words.Document      )
   at Aspose.Words.Document.​(Stream , String , SaveOptions )
   at Aspose.Words.Document.Save(String fileName, SaveOptions saveOptions)

Another bad document

@boris.nikitin,

For 265_2020_52_d_gewerbeanzeigen_gvt6_2020_08.docx, Aspose.Words currently throws following exception upon Word to PDF conversion:

System.IndexOutOfRangeException
HResult=0x80131508
Message=Index was outside the bounds of the array.
Source=Aspose.Words

We have logged it with ID WORDSNET-21910.

For LaL-Pinch-2018-Cheatsheet.docx, Aspose.Words currently throws following exception upon Word to PDF conversion:

System.ArgumentOutOfRangeException
HResult=0x80131502
Message=Specified argument was out of the range of valid values.
Parameter name: lineWidth
Source=Aspose.Words

We have logged it with ID WORDSNET-21911.

We will further look into the details of these problems and will keep you updated on the status of corrections. We apologize for your inconvenience.

The issues you have found earlier (filed as WORDSNET-21910,WORDSNET-21911) have been fixed in this Aspose.Words for .NET 21.4 update and this Aspose.Words for Java 21.4 update.