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

Free Support Forum - aspose.com

Convert XPS to PDF - Exceptions garbled

Hi,


I’ve got the following problem: I’m trying to convert a xps file to pdf.
This works flawlessly. But if the xps-file is corrupted or the xps-file I want to convert does not exist, I get funny exceptions which I cannot catch (–> Attachment).

Can anyone help me please? Just catching the general exception like in the test code is not an option, since I need to know what went wrong for further processing.

Aspose.Pdf.dll version: 9.1.0
OS: Windows 7 Enterprise
.Net-Framework: .Net 4
Test Code:

using System;
using System.Threading;
using Aspose.Pdf;

namespace ConsoleApplication3
{
class Program
{
static void Main(string[] args)
{
Aspose.Pdf.License lic = new License();
lic.SetLicense(“Aspose.Pdf.lic”);
Aspose.Pdf.LoadOptions loadOpt = new XpsLoadOptions();
Aspose.Pdf.Document x = null;

try
{
x = new Aspose.Pdf.Document(@“d:\tmp\asposetest.xps”, loadOpt);
}
catch (Exception ex)
{
Console.WriteLine(ex.ToString());
Thread.Sleep(60000);
}

x.Save(@“d:\tmp\asposetest.pdf”);
}
}
}

Hi Mario,


Thanks for your inquiry. We have noticed the exception issue in case of file not found scenario and logged an enhancement issue PDFNEWNET-37421 in our issue tracking system for further investigation and resolution.

However, we will appreciate it if you please share your sample XPS(corrupt). So we will test this scenario as well and guide you accordingly.

We are sorry for the inconvenience caused.

Best Regards,

Hi Tilal,


thanks for your reply.
Please see an example of a corrupted XPS-file in the attachments.

Kind regards
Mario

Hi Mario,


Thanks for sharing the resource file. We have noticed the exception against corrupt file and also logged issue as PDFNEWNET-37426 in our issue tracking system for further investigation and resolution. We will keep you updated about the issues’ resolution progress.

We are sorry for the inconvenience caused.

Best Regards,

Hi,


can you tell me an estimate, when the issue will be resolved, already?

Best regards,
Mario

Hi Mario,


Thanks for your patience.

We are pleased to share that the issues reported earlier are resolved and their fix will be included in next release of Aspose.Pdf for .NET 9.7.0, which is planned to release in early October-2014. Please be patient and wait for the resolution.

The issues you have found earlier (filed as PDFNEWNET-37421;PDFNEWNET-37426) have been fixed in Aspose.Pdf for .NET 9.7.0.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.