We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Convert PDF page to bitmap -> slow performances

Hi all,

I am writing a small C# console application that exports the first page of a PDF document to Bitmap.
The code I use is pretty simple but it takes a reasonable time to complete even for small pdf files. Since it’s a real-time application launced to get a bitmap of a pdf file selected via a GUI, I need to understand whether it can be improved. Maybe the source code I used is too simple?!
Please have a look here:

                    doc = new Document(inputFile);

                    // create an object of bmpDevice
                    Aspose.Pdf.Devices.Resolution pageRes = new Aspose.Pdf.Devices.Resolution(72);

                    var renderer = new Aspose.Pdf.Devices.BmpDevice(Aspose.Pdf.PageSize.A4, pageRes);

                    renderer.Process(doc.Pages[1], outputFile);

Thank you for any help!
Kind regards,

Hello, your code looks like correct. Could you please provide PDF document which you are trying to convert?

Hello, please find attached the pdf I am trying to export to bmp.
Silvio51330169399XL-EMC3130U (L_MBP)-datasheet.pdf (233.4 KB)

I measured the elapsed milliseconds and got almost 1900ms just for the “process” call function.
This is not good enough for us for a conversion on-the-fly of the first page.

Thank you. this issue is registered as ticket with ID PDFNET-51738. This thread has been linked with the issue so that you may be notified once the issue will be fixed.