Hi Fabrice,
Thank you for using Syncfusion products. ExportAsImage can be achieved only through the PdfLoadedDocument.
Method 1:
The PdfDocument cannot be directly converted to bitmap. The PdfDocument need to be stored in stream and we need to convert the stream as PdfLoadedDocument. And then the pdf can be converted to bitmap.
Please find the sample from the below link,
Method 2:
Please find the code snippet to convert the PDF page to Image using PdfLoadedDocument,
PdfLoadedDocument doc = new PdfLoadedDocument(@"Barcode.pdf");
Bitmap image = doc.ExportAsImage(0, new SizeF(doc.Pages[0].Size.Width, doc.Pages[0].Size.Height), true);
Please find the sample from the below link,
With Regards,
Gayathri R