Free Support Forum - aspose.com

Conversion from Pdf to Image Produces Blank Images or Distortion with Horizontal Lines

We’re using Aspose.Pdf to convert pages of documents to images. For most documents this will work fine. However, for some documents the resulting images will come out either blank or with lots of distortion and horizontal lines.


I’ve prepared some sample code and documents that demonstrate the problem and would appreciate any assistance. Sample1.pdf produces a blank image (Sample-Output-1.png). Sample2.pdf produces a distorted image (Sample-Output-2.png). I’m using Aspose.Pdf.dll version 7.4.0.0 (2012.09.28).

Sample code follows:

var License = new Aspose.Pdf.License();
License.SetLicense(@“Aspose.Pdf.lic”);

using (var Document = new Aspose.Pdf.Document(@“Sample2.pdf”))
{
var Page = Document.Pages[1];

var Width = (int)Math.Round(Page.Rect.Width);
var Height = (int)Math.Round(Page.Rect.Height);

var Device = new Aspose.Pdf.Devices.PngDevice(Width, Height, new Aspose.Pdf.Devices.Resolution(96));
using (var Output = File.Create(@“Sample-Output-2.png”))
{
Device.Process(Page, Output);
}
}

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

Thank you for sharing the sample files.

I am able to reproduce your mentioned issues and your issues are registered in our issue tracking system. Following are the details for your reference.

PDFNEWNET-34511: Distorted Image Generation (PDF to PNG)

PDFNEWNET-34512: Blank Image Generation (PDF to PNG)

We will notify you regarding any updates against your issues via this forum thread.

Sorry for the inconvenience,

Thank you.


What is the resolution process typically like for these kinds of issues? This issue is affecting our users and we do not have a workaround at this point.

Hi Carl,

Well, as we are just able to reproduce the issue, it will require some time for our development team to further analyze the issue and fix it. At the moment, we cannot share any details regarding when this issue can be fixed as it depends on the complexity of the issue. We will be able to share more information after the analysis from the development team. Please be patient and spare us some time to analyze the issue. As soon as we have an update, we will notify you via this forum thread.

Sorry for the inconvenience,

Hi,

Thanks for sharing this unique information… Thanks for sharing…

It has been 3 months since reporting this issue. Any update?

Hi Carl,


Sorry for the inconvenience faced. I’ve verified your reported issue. It’s still not resolved due to some other
priority tasks and it’s pending in the queue for analysis. However, I’ve
requested the team for ETA and as soon as I get a feedback I’ll update you
via this forum thread.<o:p></o:p>


Thanks for your patience and cooperation.


Best Regards,