The thumbnail generated from the code below does not match the pdf. Run the attached code and extract the thumbnail from example_pdf.pdf. example_thumb.jpg illustrates the incomplete rendering.
private static void MakeThumbnail(string filePath, string thumbPath)
{
//Load the document
Aspose.Pdf.Document pdfDocument = new Aspose.Pdf.Document(filePath);
using (FileStream imageStream = new FileStream(thumbPath, FileMode.Create))
{
//Create PNG device with specified resolution
Aspose.Pdf.Devices.Resolution resolution = new Aspose.Pdf.Devices.Resolution(300);
Aspose.Pdf.Devices.JpegDevice jpgDevice = new Aspose.Pdf.Devices.JpegDevice(resolution, 100);
//Convert page 1 and save the image to stream
jpgDevice.Process(pdfDocument.Pages[1], imageStream);
//Close stream
imageStream.Close();
}
}