Convert from PDF to image very slow

I have a pdf file(size is more 5M) need to be converted to PNG file. i use Aspose.Pdf.Page.ConvertToPNGMemoryStream method (aspose.pdf 23.6.0), it takes more then 14 hours for one page. Why it takes so long time, and what should I do to make it faster?4.pdf (6.0 MB)

When I testing in a project for .Net 6, the above code fragment works out in a few seconds.
What framework are you using?
What OS is used Windows or Linux?

var document = new Aspose.Pdf.Document(myDir + "4.pdf");
for (int i = 0; i < document.Pages.Count; i++)
    Console.WriteLine($"Page № {i}");

Thanks for your reply, my OS is windows 11 pro, and framework is .NET 6. The pdf file is stored in azure storage, and initialization of pdf document via a stream which is reading from the azure blob. I found that if the file size less than 4M, converting function is very fast, but if file size is greater then 4M, the converting function will cast 10+ hours. It doesn’t look like a network issue, because i download the file from azure storage is very fast.

I think to eliminate the influence of azure, you should download the processed file and locally run the above code snippet. Take the file being processed to the required size so that the problem reproduces.
If during such a check the problem reproduces, write, attaching the file with which the problem was reproduced.

Perhaps you should organize your work with azure so that you first completely download the file and then work with it.

If i use local memory stream, the converting job will done very soon, but unfortunately, for the performance, my app cannot download the whole file to local. I find there are some other constructors of pdf document. such as:

  1. public Document(Stream input);
  2. public Document(Stream input, bool isManagedStream);
  3. public Document(Stream input, LoadOptions options);

My app use #1, Can i use #2 or #3 to improve my converting job?

You are right, you can try option 2
public Document(Stream input, true);

option 3
public Document(Stream input, LoadOptions options);
used when importing from other formats (converting) - sets the appropriate options. And it is not applicable to open a pdf file.