We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Running out of memory (using Aspose.PDF -> TextBuilder)

Hi Aspose Team,



we are running into a “out of memory” problem, when working with large PDF-Memory streams with Aspose.PDF. First we’re using Aspose.Cells to manipulate and edit a large Excel file which is finally saved as PDF file into a memory stream.



After that, we use Aspose.PDF to add footer lines by using the following lines:



Dim tb As New TextBuilder§

tb.AppendText(GetTextFragment(1))

tb.AppendText(GetTextFragment(2))

tb.AppendText(GetTextFragment(3))

tb.AppendText(GetTextFragment(4))

tb.AppendText(GetTextFragment(5, String.Format("{0}_{1}", “TEST-ID”, “20160401”)))



Enclosed you’ll find a sample project , which you can use to reproduce the error.



The conversion process runs within 90 seconds, but when the process tries to add the text elements (within Aspose.PDF), it starts to use up to 2 GB of memory and crashes with an out of memory exception.



Dev Environment: Tests in VS 2012, VS 2013, VS 2015



(I removed Aspose.Cells.dll Version 8.7.1.3 / Aspose.PDF.dll Version 11.2.0 to shrink the project file)



Could you please assist?



Many thanks in advance.

Hi Dommer,


Thanks for using our API’s.

I have tested the scenario and have managed to reproduce same problem. For the sake of correction, I have logged it as PDFNEWNET-40693 in our issue tracking system. We will further look into the details of this problem and will keep you posted on the status of correction. Please be patient and spare us little time. We are sorry for this inconvenience.