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

Free Support Forum - aspose.com

Aspose.Pdf 11.5: PDF with light grey background lines are interpreted as pure black

When converting the attached PDF to Image, the light grey background lines in the PDF are interpreted/drawn as pure black.


public static void CreatePngFromPdf(string sPdfFilePath, string sPngFilePath, int iResolutionDPI = 300)

{

try

{

var pdfDocument = new Document(sPdfFilePath);

for (int iPage = 1; iPage <= pdfDocument.Pages.Count; iPage++)

{

string sTiffFilePathPage = string.Format("{0}\\{1}_{2}.png", Path.GetDirectoryName(sPngFilePath), Path.GetFileNameWithoutExtension(sPngFilePath), iPage);

using (FileStream fs = new FileStream(sTiffFilePathPage, FileMode.Create))

{

// Create Resolution object

Resolution resolution = new Resolution(iResolutionDPI);

PngDevice pngDevice = new PngDevice(resolution);

pngDevice.Process(pdfDocument.Pages[iPage], fs);

fs.Close();

}

}

}

catch (Exception ex)

{

throw new Exception(string.Format("Failed to create PNG from PDF file: {0}", sPdfFilePath), ex);

}

}


Hi Bjornar,

Thanks for your inquiry. I have tested your scenario with shared document using Aspose.Pdf for .NET 11.5.0 and managed to observe the reported issue. For further investigation, I have logged an issue in our issue tracking system as PDFNEWNET-40703 and also linked your request to it. We will keep you updated via this thread regarding the issue status.

We are sorry for the inconvenience caused.

<span style=“font-size:10.0pt;font-family:“Arial”,“sans-serif”;mso-fareast-font-family:
Calibri;color:#333333;mso-ansi-language:EN-US;mso-fareast-language:EN-US;
mso-bidi-language:AR-SA”>Best Regards,