I used Aspose.PDF to change a PDF page to jpg file. But the result is that the text can’t be seen.
for (int pageCount = 1; pageCount <= pdfDocument.Pages.Count; pageCount++)
{
using (FileStream imageStream = new FileStream("image" +
pageCount + ".jpg", FileMode.Create))
{
//create JPEG device with specified attributes
//Width, Height, Resolution, Quality
//Quality [0-100], 100 is Maximum
//create Resolution object
Resolution resolution = new Resolution(300);
//JpegDevice jpegDevice = new JpegDevice(500, 700, resolution,
100);
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();
}
}
the pdf is in attachments.
Hope to hear from you soon