Hi,
I’m experiencing an issue when converting PDF file to Png.
The rendered png is almost empty / white.
Here is the code I run, with Aspose.Pdf in v20.3.0.0 :
var pdfFilename = @"D:\TestFile.pdf";
var pdfDocument = new Document(pdfFilename);
int pageRank = 1;
foreach (var pdfDocumentPage in pdfDocument.Pages)
{
var pngFileName = pdfFilename.Replace(".pdf", $"-{pageRank}.png");
using (var imageFileStream = new FileStream(pngFileName, FileMode.Create))
{
var resolution = new Resolution(300);
var pngDevice = new PngDevice(resolution);
pngDevice.Process(pdfDocumentPage, imageFileStream);
imageFileStream.Close();
}
pageRank++;
}
And here is the pdf used; Facture 4137394.pdf (109.0 KB)