Here is the code:
- Code: Select all
var pdfDocument = new Spire.Pdf.PdfDocument();
pdfDocument.LoadFromFile(pdfFileName);
var pdfPageAsPng = (Bitmap)pdfDocument.SaveAsImage(pageNumber - 1, PdfImageType.Bitmap);
pdfPageAsPng.Save(@"C:\temp\test.png", ImageFormat.Png);
Attached the source PDF and destination PNG. We tested this with Version 3.7.0.5041.