We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

PDF to images performance

Has anyone has performance issue with the Syncfusion.Pdf.Base, when using ExportAsImage? When using ExportAsImage we're specifying the page number as well as DPI. The performance when developiong and testing out solution was fantastic, easily getting eight plus pages per second conversion, but we keep finding the performance in our Live environment (which is more powerful than our testing environments) is about eight to ten times slower.

Unfortunetly I'm not able to provide any samples of the files here, due to contract specifications. I've also been unable to replicate the issue with files I've produced.

We are currently using 14.2460.0.731 in our production environments, due to a hotfix we were given.

Below is a code sample, that is similar to our production
using (PdfLoadedDocument pdfDocument = new PdfLoadedDocument(document.SourcePathFileName))
{
    int totalNumberOfPages = pdfDocument.Pages.Count;

    string sub = Path.GetFileName(document.SourcePathFileName);
    string y = Path.Combine(outputDirectory, sub, "Something_{0}.png");
   
    try
    {
        for (int i = 0; i < totalNumberOfPages; i++)
        {
            string imageFileName = string.Format(y, i);
            Bitmap x = pdfDocument.ExportAsImage(i, 150, 150);
            this.WriteFile(imageFileName, x, pageCount);
        }
    }
    catch (Exception ex)
    {
        // log error.
    }
}

1 Reply

AA Akshaya Arivoli Syncfusion Team May 22, 2017 11:10 AM UTC

Hi Gareth, 

Thank you for contacting Syncfusion support 

We regret to let you know that we were unable to reproduce the issue “ExportAsImage consumes more time in production environment” with the provided details. So, can you please share us the PDF document, replication procedure and the sample in which the issue could be reproduce. Also, can you please confirm us the Platform in which you are using? These details will be helpful for us to investigate more on your issue and assist you better. 

Regards, 
Akshaya 


Loader.
Live Chat Icon For mobile
Up arrow icon