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

Free Support Forum - aspose.com

Too much memory allocation


I had tested to attach file in pdf.

It seems too much memory consumption when embedding file into pdf.

Here’s my memory usage result.

if file size is 442MB => approx. 1500MB memory used to work.
if file size is 528MB => approx. 2160MB memory used to work.

my test show embedding file work use memory 4 times more than original file size

My website running on 32bit process mode and application can not use memory over 2GB.
But Aspose pdf.net required over 2GB memory to working

I would like to know that is it normal behavior on Aspose PDF.Net library

I’m attaching my test code.It needs to create ASP.NET MVC project

Aspose.PDF.dll version is

HomeController.zip (2.3 KB)


Thank you for contacting support.

Would you please share sample source file with us via Google Drive, Dropbox etc. and mention how are you monitoring usage of memory. We will appreciate if you can share the MVC project instead of one controller class. Moreover, latest versions of the API perform better so kindly ensure using Aspose.PDF for .NET 19.3, then share your observations, environment details and data with us.

Hello Farhan.
I attached my test project here. https://ufile.io/ttusw

You can open this project with VS2015.

I watched peak memory amount to test using process explorer and windows task manager


Thank you for sharing the data.

Please also specify if you are embedding huge files into smaller source file or smaller files into huge file as we are noticing the application to be consuming around 200MB memory but a lot of time when smaller files are embedded into a huge 400MB PDF document. Therefore, please specify your use case so that we may investigate accordingly.