When converting from Image to PDF using Aspose.PDF, there seems to be a memory leak when using RgbToDeviceGrayConversionStrategy()
I have proviced a code example below:
Private Sub ConvertToGreyscale(ByRef doc As AP.Document)
Dim strategy = New Aspose.Pdf.RgbToDeviceGrayConversionStrategy()
For Each page In doc.Pages
strategy.Convert(page)
Next
End Sub
This was also present in version 19.4, and upgrading to 19.9 hasn’t solved the issue. Could you please look in to this.
Would you please elaborate if you notice this problem with specific PDF document or with every document. Kindly share a sample document so that we may proceed to reproduce and investigate further.
Would you kindly elaborate further of memory leak as we tested the scenario in our environment and were unable to notice any issue with Aspose.PDF for .NET 19.9. Attached is the final output that we produced in our environment. OUTPUT.pdf (287.5 KB)
Would you kindly share some screenshot or sample project with us which is able to replicate the issue that you are facing. We will further proceed to assist you accordingly.
ConsoleApp5.zip (104.2 KB)
Hi, I have attached a sample c# project which loops through the conversion. If you monitor the memory usage by the app you can see it keeps increasing over time.
The license file path in the app.config will need changing, and the nuget package will need to be restored before running the app.
We were able to notice that memory consumption kept increasing while calling API methods inside loop. We have logged an issue as PDFNET-47070 in our issue tracking system for the sake of correction. We will further look into this and keep you posted with the status of its rectification. Please be patient and spare us little time.
Hello Asad.Ali.
We’re having the same issue with the .NET Aspose.Pdf.RgbToDeviceGrayConversionStrategy().
When placed inside a loop to process several PDFs, we notice that processing time increases exponentially after each file even when all the files are the same size.
Did you have a fix for PDFNET-47070 ?
We are afraid that the earlier logged ticket has not been yet resolved. However, we have recorded your concerns and will surely inform you as soon as we have some certain news about its resolution. Please be patient and spare us some time.
Hi,
Is there a way to view the ticket? Is it publicly available? Generating pdf from html does seem to leak memory in .NET Aspose.PDF 22.1.0. Easily noticeable when you do a lot of conversions over a period of time. @asad.ali
The ticket has been logged in our internal issue management system and we are afraid that you cannot view it. However, we will keep you posted in this forum thread about the resolution status. At the moment, the ticket is not resolved and as soon as it is fixed, we will share updates with you. Please spare us some time.
We are afraid that the ticket could not get resolved due to other pending issues in the queue. We will surely provide an update in this forum thread as soon as we have some in this regard. Please spare us some time.