Free Support Forum - aspose.com

Convert PDF to Images using Aspose.PDF for .NET - Process is taking long time

We use Aspose.Pdf 19.4.0.
There is a large PDF document about 600 MB in size. We need to convert some pages of this document to images. To do this, we used the following code:

Summary
var resultConvert = new ConvertResult { FolderPath = UniqTempFolderName, IsImage = true };
      try
      {
        using (new Foundation.Security.Deimpersonation())
        {
          using (var document = new Document(settings.InputFilePath))
          {
            resultConvert.PageCount = document.Pages.Count;

            using (var imageStream = new FileStream(settings.ResultFilePath, FileMode.Create))
            {
              var resolution = new Resolution(_convertResolution);
              var imageDevice = new PngDevice(resolution);
              var page = document.Pages[settings.PageNumber];

              var swConvertation = new Stopwatch();
              swConvertation.Start();

              imageDevice.Process(page, imageStream);

              swConvertation.Stop();
              Log.LogInfo($">> Convertation pdf to image ended. time: {swConvertation.Elapsed.TotalMilliseconds}ms");

              imageStream.Close();

              resultConvert.ResultFiles[settings.PageNumber] = settings.ResultFileName;
            }
          }
        }
      }

As a result, the pages take quite a long time to convert (11.5 seconds). There is an entry in the log file:
24.04.2020 17:28:49 Information >> Convertation pdf to image ended. time: 11455,1858ms

How can I make the pages convert faster?

@directum

Would you kindly share the Page Number(s) which are taking long time to convert into PNG. We will test the scenario in our environment and address it accordingly.

Document conversion time does not depend on the specific pages we try to convert. It takes a while no matter which pages are converted. We tested on pages 300, 301 and so on.

@directum

We were able to notice that API was taking long time to convert PDF Pages into PNG images. We have logged an issue as PDFNET-48118 in our issue tracking system related to the performance of the API. We will further look into its details and keep you posted with the status of its correction. Please be patient and spare us some time.

We are sorry for the inconvenience.

Could you please tell me when this issue is going to be fixed?

@directum

We would like to share with you that the issue has been logged under normal support model and it has low priority. It will be resolved on first come first serve basis. We will surely inform you as soon as it is resolved. Please spare us some time.

We are sorry for the inconvenience.

  1. Can we get an approximate time frame for solving this problem? It is important for us to know the approximate dates.
  2. What are the typical deadlines for solving the problem in the case of “standard” or “paid” support?

@directum

We are afraid that any ETA cannot be shared until the ticket is fully investigated. As shared earlier, it will be investigated/resolved on first come first serve basis and we will surely share updates with you as soon as we have some.

Please note that paid/priority support is recommended for the issues which are blocker or showstopper for you. The priority support does not guarantee any immediate solution but, it does expedite the process of investigation in terms of getting an ETA or Fix (dependant upon the nature and complexity of the issue).

It’s been more than four months since filling the ticket. Could you please specify what is the status of these works? At the moment the situation is relevant for us. Any workaround solutions didn’t solve the problem for the costumer.

@directum

We surely understand your concerns and realize the severity of the issue. However, the performance-related issues are complex in nature and need a certain amount of time in order to get fixed. We have recorded your concerns and will surely consider them during issue investigation. We will inform you as soon as we make some certain progress towards ticket resolution. We greatly appreciate your patience and cooperation in this matter. Please give us some time.

We apologize for the inconvenience caused.

It’s been more than seven months since filling the ticket. Could you please specify what is the status of these works? At the moment the situation is relevant for us.

@directum

We are afraid that the ticket could not get resolved yet. However, we have escalated its priority to the next level and will surely try to share some ETA with you as soon as possible. We greatly appreciate your patience and comprehension in this regard.

We apologize for the inconvenience faced.

Good afternoon, it has been 2 months since the last response and 10 months since the registration of the ticket, please specify the status of the work.

@directum

We would like to share with you that investigation against your issue has been planned and currently is ongoing. As soon as it is complete, we will be able to share some updates regarding resolution ETA or issue fix. We highly appreciate your patience and comprehension in this matter. Please give us some time.

We apologize for the inconvenience.