winforms-demos
winforms-demos copied to clipboard
Issue with memory usage
Hi there!✌ Sorry, if that isn't right place for this, but i was meet an issue while working with following class:
- ConvertToPDF method of
Syncfusion.DocToPDFConverter.DocToPDFConverter(with WordDocument signature)
When that method are executing application consume huge amount of RAM, and when RAM is over - starts using virtual memory (swap). After conversion ends, memory doesn't release and this pretty sad.
Releasing resources it's main problem in this case, but it would be great to add the feature to interrupt the conversion may be, because sometimes that takes are really long time.
Usage in code:
~~~
using (var documentMemoryStream = new MemoryStream(source.Data))
{
using (var wordDocument = new WordDocument(documentMemoryStream, FormatType.Automatic))
{
wordDocument.ChartToImageConverter = new ChartToImageConverter();
using (var converter = new DocToPDFConverter())
{
using (var pdfDocument = converter.ConvertToPDF(wordDocument))
{
pdfDocument.EnableMemoryOptimization = true;
pdfDocument.Save(resultStream);
}
}
}
}
~~~
Found at Syncfusion.DocToPDFConverter.WinForms v. 24.1.41 Reproduces with this file: Notes for English learning.docx