High memory utilization when converting PDF to PNG

Hi Aspose team,


We have a problem with high memory utilization when converting PDF to PNG. Here is a code snippet that we are using:

Document pdfDocument = new Document(@“c:/Desktop/OPUS-7700_PayStation.pdf”);
for (int pageCount = 1; pageCount <= pdfDocument.Pages.Count; pageCount++)
{
string tmpImgToInsert = “image_from_pdf_” + pageCount + “_” +
DateTime.Now.Ticks + “.png”;
using (FileStream imageStream = new FileStream(tmpImgToInsert, FileMode.Create))
{
//create PNG device with specified attributes
//Width, Height, Resolution, Quality
//Quality [0-100], 100 is Maximum
//create Resolution object
Resolution resolution = new Resolution(300);
PngDevice pngDevice = new PngDevice(resolution);
//convert a particular page and save the image to stream
pngDevice.Process(pdfDocument.Pages[pageCount], imageStream);
}
}

I attached OPUS-7700_PayStation.pdf file, as well as memory usage report diagrams for two versions of Aspose.Pdf. Is there a way to reduce memory usage?

Regards,
Radovan

Hi Radovan,


Thanks for contacting support.

I have tested the scenario and have managed to reproduce the issue that while converting your provided PDF file to PNG it consumes high memory. For the sake of correction, I have logged a ticket in our issue tracking system. We will further look into the details of this issue and will keep you updated on the status of its resolution within this forum thread. Please be patient and spare us little time.

We are sorry for this inconvenience.

Best Regards,

Hi Fahad,


Any update on this?

Regards,
Radovan

Hi Radovan,


Thanks for your inquiry.

Please note that performance of the API depends upon many factors to be noticed i.e complexity and structure of the input file, working environment, application type, API version etc. As we have recently observed the issue with your specific input document, so I am afraid that it is not resolved yet. I am sure that relevant team will start an initial investigation against your issue as per their development schedule.

We will certainly keep you updated with the status of resolution process of the issue, which has been logged as PDFNET-42709, in our issue tracking system. We really appreciate your patience and cooperation in this matter. Please spare us little time.

We are sorry for the inconvenience.


Best Regards,

Hi Asad,


Thanks for reply. Is there any ETA for this?

Regards,
Radovan

Hi Radovan,


Thanks for contacting support.

I have checked the status of the logged issue and I am sorry that it is pending for review. As shared earlier that we just have been notified about the issue and there are other reported issues in the queue which were logged prior to this. We are sure that product team will start an initial investigation for this issue soon as per their development schedule and we will keep you informed with the status within this forum thread.

We greatly appreciate your patience and cooperation in this regard. Please spare us little time. We are sorry for the inconvenience.


Best Regards,

Hi all,


Any update on this? Our clients asked to put some urgency on this.

Regards,
Radovan

Hello Radovan,


Thanks for your inquiry.

I am afraid that earlier logged issue has not been resolved yet, due to other high priority issues in the queue. Though we have recorded your concerns and intimated development team about them. As soon as we have some updates in this regard, we will certainly inform you. Please be patient and spare us little time.

We are sorry for the inconvenience.


Best Regards,