Hi. I want to create an image file of a PDF page, but with some PDF files, all I get is a blank image. The image is the correct size, but it is just white. With other PDF files, the output image is fine. What can I do to ensure I always get a good image?
I am using the following code to generate the image. I have attached an example PDF and example Visual Studio solution.
var pdfDocument = new Document(@"..\..\OnePagePdf.pdf");
var pngDevice = new PngDevice(new Resolution(200));
using (var fileStream = File.Open(@"..\..\OnePagePdf.png", FileMode.Create))
{
pngDevice.Process(pdfDocument.Pages[1], fileStream);
}
We were able to replicate the issue in our environment and have logged it as PDFNET-47234 in our issue tracking system. We will further investigate the reasons behind this issue and keep you posted with the status of its correction. Please be patient and spare us little time.
We regret to share that the ticket is not yet resolved due to low priority and other high priority issues in the queue. We will surely inform you as soon as we have some definite updates about resolution of the ticket. Please spare us some time.