We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Convert a pdf page to image. text can't be seen

I used Aspose.PDF to change a PDF page to jpg file. But the result is that the text can’t be seen.


what is the problem.

I did as your demo code below:

Document pdfDocument = new Document(“input.pdf”);

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

Hi,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for sharing the sample code and template file.

I tested your issue with the latest version of Aspose.Pdf for .NET v7.3 and I am unable to notice any problem. The PDF pages are converted to image properly and the text is readable. Please download and try the latest version and do let us know if it resolves your issue.

Sorry for the inconvenience,

Thanks for your reply!

But Now I meet another question. when I first convert a word to a pdf, I choose PdfSaveOptions.EmebdFullFonts = true. Then I convert the pdf to images. the Chinese fonts can’t be seen. some code about my converting from a word to pdf.
private Document wordFile;
private PdfSaveOptions options;
options.EmbedFullFonts = true;

wordFile.Save(“file.pdf”, options);


There is my word file in attachments.

Hi,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for sharing the details.

I am able to reproduce the issue with the latest version of Aspose.Pdf for .NET using your template file. Your issue has been registered in our issue tracking system with issue id: PDFNEWNET-34223. You will be notified via this forum thread regarding any updates against your issue.

Sorry for the inconvenience,

The issues you have found earlier (filed as PDFNEWNET-34223) have been fixed in Aspose.Pdf for .NET 10.8.0.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.

I see this same problem in version 11 now.

Hi Phil,


Thanks for your inquriy. Usually issues vary from file to file, please share your sample input/output documents here, we will look into it and will guide you accordingly.

We are sorry for the inconvenience caused.

Best Regards,