New Aspose.Pdf.Document(file path) throws an exception

Hi,

We have a problem using Aspose.Pdf for .NET product (version 7.6.0.0) with certain PDF files. We’re processing PDF files received from multiple customers, so we don’t have any control over how these files were created. All files could be viewed in Adobe Acrobat Reader without any issues. Here is a snippet of the code that generates an exception for certain files:
try
{
FileInfo fi = new FileInfo(“sample.pdf”);
if (fi.Exists)
{
Aspose.Pdf.Document doc = new Aspose.Pdf.Document(fi.Name);
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message, fi.Name);
}

Document constructor that takes a valid pdf file throws an exception “Object reference not set to an instance of an object.” We can provide sample.pdf file that throws an exception. We would prefer to continue using Aspose.Pdf for .NET product (version 7.6.0.0) we have.

I can see that there is a similar topic, but I don’t have access to it. Is this a known issue? How can we resolve it? Thanks.

@lev.eydelman

We are afraid that you are using quite older version of the API whereas, it is always recommended to use latest version. There have been a lot of changes and improvements in the API since the version you are using right now.

There is no such known issue in the API as some times issue may be related to specific kind of document. You may please try opening it using Aspose.PDF for .NET 19.10 and in case you still face any issue, please share your sample PDF with us. We will test the scenario in our environment and address it accordingly.

PS: The support is provided on the basis of latest version of the API.