Free Support Forum -

Xps to pdf file conversion in C#

The input xps file containing a wide table , is unable to convert using the below code
var saveOptions = new GroupDocs.Conversion.Converter.Option.PdfSaveOptions(); saveOptions.ConvertFileType = PdfSaveOptions.PdfFileType.Pdf; saveOptions.PdfOptions.PdfFormat = PdfOptions.PdfFormatType.PdfA_3A; convertResult = conversionHandler.Convert(inputFile, saveOptions); ,

using the same above code other xps files are converting but the attached file is not converting
showing the error on Convert method line as
"index was outside the bounds of array" (45.2 KB)


Thanks for taking interest in GroupDocs.Conversion for .NET and posting your concerns. In order to investigate your issue at our end, we need following details from you:

  • API version you integrated in the project
  • Share the problematic document with us

Hi ,
.I have used the latest API version as available on website to download- i dont know which version

.I am sharing the project file in zip containing project file named ‘GDAppDemo’ and the 3 xps input file am uploading to convert .AMong that 3 files , the file “SKGM_FINAL1Purchase_Anugypati_Report2421821.xps” is showing error to convert in Convert method.

the exact error details are as follows:
[System.IndexOutOfRangeException] {System.IndexOutOfRangeException: Index was outside the bounds of the array.
at .()
at .()
at .()
at .(XmlNode , ApsCompositeNode )
at .(XmlNode )
at .(String )
at .(Stream )
at .(Stream , Document , XpsLoadOptions , Boolean )
at Aspose.Pdf.Document.(Stream , LoadOptions )
at Aspose.Pdf.Document…ctor(Stream input, LoadOptions options)
at . ​(LoadOptions )
at .(FileDescription , Stream , LoadOptions , SaveOptions )
at . ​(String , LoadOptions , SaveOptions )
at GroupDocs.Conversion.Handler.ConversionHandler.Convert(String guid, LoadOptions loadOptions, SaveOptions saveOptions)
at GDAppDemo.Controllers.HomeController.ConvertCommand(String inputFile, String outputFileType) in C:\Users…\Desktop\Workspace\GDAppDemo\GDAppDemo\Controllers\HomeController.cs:line 58}

Hope you will get my issue and help me to resolve it.

Incase you dint get the attachment , I am attaching the we transfer link, from there you can download the attachment

we transfer link to download attachment


We reproduced this issue at our end as well. Hence, it’s been logged in our internal issue tracking system with ID: CONVERSIONNET-2364. As we get any update from the concerned team we shall notify you.

Thanks , I’ll be waiting for the update .

I m attaching the pdf file(converted from other source) that i want from the previously attached xps file .
Sample.pdf (82.5 KB)


Sure. We’ll notify you as we get any update from the concerned team.


We are pleased to inform you that your reported issue CONVERSIONNET-2364 is resolved in GroupDocs.Conversion for .NET 18.9.