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

Free Support Forum - aspose.com

Blurry PDF export

Hi,


When generating a PNG or JPG from PDF using Java 1.7 on Mac 10.9, we’re getting very blurred output. I’ve attached the output from Aspose, the one from Apple’s Preview and the PDF.

The code we use to generate it is:


Document doc = new Document(inStream);
PngDevice dev = new PngDevice(new Resolution(72));

dev.process(doc.getPages().get_Item(1), outStream);

I’ve tried with different resolutions and with different files, but Aspose’s text is always blurry.

Can we do something to fix this, or is this a bug in Aspose.PDF?

Thank you in advance.

Forgot to say, this is with Aspose.PDF 9.3.1

Hi Edu,


Thanks for using our API’s.

We are working over this query and will get back to you soon.

Hi Edu,


I have tested the scenario where I have specified 300 as resolution value and as per my observations, the output seems to be fine. For your reference, I have also attached the image generated over my end.

[Java]

com.aspose.pdf.Document
doc =
new
com.aspose.pdf.Document(
“c:/pdftest/457_Visa_factsheet.PDF”);<o:p></o:p>

com.aspose.pdf.devices.PngDevice dev = new com.aspose.pdf.devices.PngDevice(new com.aspose.pdf.devices.Resolution(300));

dev.process(doc.getPages().get_Item(1), "c:/pdftest/457_VISAOutput.png");

Hi, thanks for your reply.


Obviously, at higher resolutions the problem is less noticeable, but we’re working at 72dpi and the problem is very obvious. Also, I still see the blurriness on your document when comparing it to a proper export (attached).

Still, I’ve attached an export done at 300dpi of only a part of the document. You’ll notice that the top text (Aspose) is blurry and the bottom one (Apple Preview) is not. If you zoom in, you’ll see that the stick of the first ‘f’, for example, is 3px wide on Aspose, but only 2px wide on Preview’s. Also, you’ll notice that Aspose has 2 extra pixels at the bottom of the ‘f’.

It seems that when rendering, all the text is being displaced 0.5px to the right and something like 0.75px to the bottom. That also causes the issue with the ‘I’, that is only 1px wide on the Aspose version (really 2px, but the first column of pixels is too faint to be noticed).

As I said before, this problem is exacerbated at lower resolutions, like 72dpi, but even at 300dpi, that quality is unacceptable for most documents.

Hi Edu,


Thanks for sharing the details.

I have again tested the scenario in details and have observed that when converting PDF pages to PNG format where Resolution value is specified as 72, the output image is blurred. For the sake of correction, I have logged this problem
as PDFNEWJAVA-34367 in our issue tracking system. We will further
look into the details of this problem and will keep you updated on the status
of correction.

Please be patient and spare us little time. We are sorry for
this inconvenience.

Hi Nayyer,


Thanks for filling the issue, although as I demonstrated in my last message, the issue is not only at 72dpi, but at any (like 300dpi as shown before), and not only with PNG, but any format.

Thank you again
atlassian:
Thanks for filling the issue, although as I demonstrated in my last message, the issue is not only at 72dpi, but at any (like 300dpi as shown before), and not only with PNG, but any format.
Hi Edu,

Thanks for sharing the feedback.

We will definitely consider the above stated scenarios during the resolution of this issue. Please note that during our further testing over MAC OSX 10.8.2, we have noticed that an OutOfMemory error is being generated when setting Resolution value as 300. We have separately logged it as PDFNEWJAVA-34368 in our issue tracking system. As soon as we have some definite news regarding the resolution of above stated issues, we will let you know.

Hi Nayyer,


It’s been a while, is there any movement on this? We’d really like to see this given some priority, as converting PDFs to images is currently a very poor experience (a key feature for us). If there hasn’t been any progress, can you please give an estimate for when this will be fixed?

Thanks

Hi Edu,


The development team is working hard on improving the PDF to Image conversion feature but I am afraid the earlier reported problems are not yet resolved. Nevertheless, I have requested the development
team to share any possible ETA. As soon as I have some updates regarding their resolution, I would be more than happy to update you with the status of
correction. Please be patient and spare us little time.

We are sorry for this delay and inconvenience.

The issues you have found earlier (filed as PDFNEWJAVA-34368) have been fixed in Aspose.Pdf for Java 10.1.0.


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

The issues you have found earlier (filed as PDFNEWJAVA-34367) have been fixed in Aspose.Pdf for Java 16.11.0.


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