Color pdf Identification error

We got a issue while processing PDF though aspose components.
Version used: 12.0.0.0
1. Not supported image type

We have to identify color PDF. When we try to identify ColorType of PDF, we are getting an error: "Not supported image type". Heard this issue was with previous version, and fix was in place. But still we are getting this error.

StackTrace we got:

at Aspose.Pdf.XImage.Save(Stream stream, ImageFormat format, Int32 resolution) at Aspose.Pdf.XImage.GetColorType() at Aspose.Pdf.Page.[1]() at Aspose.Pdf.Page.get_ColorType()

Debugging shows its "NotImplemented" exception.

Please advice how to get rid of this exception, as its very critical at this moment.

Hi There,

Thanks for contacting support.

I am afraid that you are using a quite old version of the API whereas it is always recommended to use the latest version which is 17.3.0. I have tried to get ColorType from a sample PDF file at my side and I did not notice any issue. I have used latest version of the API and following code snippet.

Document doc = new Document(dataDir + “sample.pdf”);
Console.WriteLine(doc.Pages[1].ColorType);

Please try using the latest version and in case if you still face any issue we will really appreciate if you please share a sample code snippet along with sample document. It will really help us in testing the scenario in our environment and get back to you accordingly. We are sorry for the inconvenience.

Best Regards,

I have tested with aspose.pdf 17.6 version I am getting the same error for one particular pdf file. Could you check the file selenium-recipes-in-csharp-sample.pdf (879.1 KB). With latest version.

@pavinan

Thanks for contacting support.

We were able to replicate the issue while using Aspose.PDF for .NET 18.2 and it is logged under the ticket ID PDFNET-44220 in our issue tracking system. We will further investigate the issue in details and keep you posted with the status of its correction. Please be patient and spare us little time.

We are sorry for the inconvenience.

The issues you have found earlier (filed as PDFNET-44220) have been fixed in Aspose.PDF for .NET 21.5.