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

Free Support Forum - aspose.com

Convert PDF to PNG in .NET using Aspose.PDF - Output image is unreadable

We convert PDFs to PNG using Aspose PDF.NET and are generally happy with the results.

We have been provided with a PDF document that has a low-quality font (it looks pixelated and not vector-smooth, but it is a font and not an image). The PDF document is readable. When we convert it to a PNG the output image is unreadable with characters completely missing upstrokes and horizontal strokes.

If we push the output PNG to a resolution that is massive and then take the output massive image and use System.Drawing.Bitmap to resize the image to something back to what we wanted, we can get readable results, but this is an impractical workaround to avoid Aspose.PDF not being able to create a readable image in our desired size / resolution.

We use more options than the code below (and have tried all the RenderingOptions) but we can recreate the issue with this document with the following code:

 Dim document As Aspose.Pdf.Document = New Aspose.Pdf.Document("c:\temp\test.pdf")
 Dim page As Aspose.Pdf.Page = document.Pages(1)

 Dim pngDevice As New Aspose.Pdf.Devices.PngDevice(New Aspose.Pdf.PageSize(page.Rect.Width, page.Rect.Height))
 pngDevice.Process(page, "c:\temp\test.png")

We are using the latest version of Aspose.PDF v19.6.0

Attachments included below - test.pdf is the source document and test.png is the output image.

Problem can be seen in first word on the document - HIRING is missing the upstroke in the R - but most characters are pretty poor.

Any support would be much appreciated

Ali

test.pdf (50.1 KB)
test.png (388.3 KB)

@alistairgranger

We have tested the scenario in our environment and were able to notice the issue. We have logged it as PDFNET-46569 in our issue tracking system. We will further look into details of the issue and keep you posted with the status of its correction. Please be patient and spare us little time.

We are sorry for the inconvenience.

Thanks @asad.ali - much appreciated. I look forward to your update.

Hi @asad.ali - have you had a chance to look at this issue?

We’ve run our scenarios through Ghostscript with the same res and size output and have had better results than the Aspose test. In Ghostscript we’ve been using 24bit colour and mid-range text-antialiasing, but we’ve tried most permutations of output quality and they are all looking more readable.

Hoping for an update soon - thanks!

@alistairgranger

Since, the issue was logged under free support model, it has low priority and will be investigated/resolved on first come first serve basis. However, we will surely let you know as soon as some definite updates are available regarding its rectification.

We have recorded your above concerns and will definitely consider them during issue investigation. Please be patient and spare us little time.

We are sorry for the inconvenience.

Thanks for your reply - I totally understand that this is under the free support model. I was noting the result of our investigations just as a point of reference, in case there was anything helpful there.

Given that the request is low priority and first come, first served, can you indicate how far down the queue of current request my request is?

Thanks,

Alistair

@alistairgranger

The investigation and resolution time of the issue may depend upon how complex are the issues logged prior to it. We are afraid that we cannot share any reliable ETA at the moment as we have high priority issues as well logged under priority support model. Please note that the issues logged under priority support model have precedence over the issues logged under free support model.

Nevertheless, we will definitely take care of your concerns and will let you know as soon as we make some certain progress towards resolution of your issue. Please be patient and spare us little time.

We are sorry for the inconvenience.

Hi @asad.ali - is there any update to this ticket? Has it been reviewed in any way since your last comment.

Thanks,

Alistair

@alistairgranger

We are afraid that your issue is not yet resolved yet due to other high priority tasks. However, we will let you know as soon as there is some certain news on resolution of the issue. Please spare us little time.

We are sorry for the inconvenience.

Thanks @asad.ali

Hi @asad.ali - is there any update to this ticket? Has it been reviewed in any way since your last comment.

Thanks,

Alistair

@alistairgranger

We are afraid that due to low priority in normal support module, your issue could not get investigated yet. We will surely let you know as soon as we make some definite progress towards issue resolution. Please spare us some time.

We are sorry for the inconvenience.

Hi @asad.ali - is there any update to this? Is this ticket likely to be scheduled in the next few weeks? Have you got anywhere that you publish what’s on your dev slate?

Thanks,

Alistair

@alistairgranger

We regret to share that no updates are available regarding resolution of the issue logged earlier. We have recorded your concerns and will definitely consider them while investigating/resolving the issue. Please be patient and spare us little time.

We are sorry for the inconvenience.

@alistairgranger

We regret to share that no updates are available regarding resolution of the issue logged earlier. We have recorded your concerns and will definitely consider them while investigating/resolving the issue. Please be patient and spare us little time.

We are sorry for the inconvenience.

Hi @asad.ali - is there any update on this item? Have you got any indication of whether this is in scope for your incoming development schedule?

Thanks,

Alistair

@alistairgranger

We are afraid that your issue is not yet resolved due to other high priority issues and implementations to the API. We will surely inform you as soon as we make some definite progress towards its rectification. Please spare us little time.

We are sorry for the inconvenience.

Hi @asad.ali - Happy New Year - is there any update to this ticket? Has this issue that was acknowledged six months ago been resolved? If not, is there a plan to resolve it early in 2020?

Thanks,

Alistair

@alistairgranger,

I regret to inform that issue is still unresolved. We are working on this and will share good news with you soon.

Thanks @Adnan.Ahmad - that’s good to hear that you’re working on this. I look forward to hearing more soon