Hi,
I have downloaded aspose trail version for converting pdf to image and image to pdf. When I am converting pdf to image than some files are converted and some are not. Means most of the files I found is not converting to png or any image type.
Hi,
I have downloaded aspose trail version for converting pdf to image and image to pdf. When I am converting pdf to image than some files are converted and some are not. Means most of the files I found is not converting to png or any image type.
Hi Tarang,
Hi,
Hi Tarang,
Thanks for sharing the resource file.
I have tested the scenario using the following code snippet with the latest release of Aspose.Pdf for .NET 8.6.0 and I am unable to notice any issue. The file is properly being converted to Image format. For your reference, I have also attached the resultant Image generated over my end.
C#
//open document
Document pdfDocument = new Document("c:/pdftest/Prueba+1.PDF");
for (int pageCount = 1; pageCount <= pdfDocument.Pages.Count; pageCount++)
{
using (FileStream imageStream = new FileStream("c:/pdftest/Prueba+1_image" + pageCount + ".jpg", FileMode.Create))
{
Resolution resolution = new Resolution(300);
JpegDevice jpegDevice = new JpegDevice(resolution, 100);
//convert a particular page and save the image to stream
jpegDevice.Process(pdfDocument.Pages[pageCount], imageStream);
//close stream
imageStream.Close();
}
}
Hi,
Hi Tarang,