Error converting pdf page to image

Hello,

I am using this c# code>>

private Document doc = null;
PngDevice pngDevice = null;



MemoryStream ms = new MemoryStream();
doc.Pages[1].SendTo(pngDevice, ms);

Get this exception::

Wrong object format. Id:7 Generation:0

Sample file is attached.

Thanks!

Hi there,


Thanks for your inquiry. While testing with latest version of Aspose.Pdf for .NET 7.8.0, I’m unable to reproduce reported issue at my side. Can you please confirm your Aspose.Pdf Api version? If you are using some older version then please download and try latest Api from download area. Hopefully your issue will be resolved. If issue persist then please share your complete code here. So we will test it at our end and will provide you more information accordingly.

Best Regards,