Spire.PDF is a professional PDF library applied to creating, writing, editing, handling and reading PDF files without any external dependencies. Get free and professional technical support for Spire.PDF for .NET, Java, Android, C++, Python.

Wed Jan 29, 2014 6:37 pm

We are running a printing service using SpirePDF on a server, and after a couple of days of heavy printing request, the service is crashing with an "Out of memory" exception. I have managed to track it down to SprirePDF, especialy when using TrueType fonts embedded in the pdf file (Althought the memory leak seems to be present even in the examples available on your site).

On my computer, this piece of code is eating all the memory in under 10 seconds (not a real case, but this is only to demonstrate the problem - we obviously don't create millions of font every seconds).

Code: Select all
            PdfDocument doc = new PdfDocument();

            while (true)
            {
                PdfTrueTypeFont font = new PdfTrueTypeFont(new Font("Comic sans ms", 10));
            }

            doc.Close();


The question is : Am I doing something wrong? Or if there is actually a memory leak somewhere?

Thanks

gumby
 
Posts: 21
Joined: Tue Jan 28, 2014 8:25 pm

Thu Jan 30, 2014 9:26 am

Hello,

Thanks for your inquiry.
Would you please list the below information in your message, it may help us to reproduce your issue quickly and offer the solution to you. Please send them to support@e-iceblue.com if you could.

1. Dll file list (name + version), for example:
Spire.License.dll v4.9.32.3040
Spire.Pdf.dll v2.8.86.3040

2. Operation System, for example:

Windows 7 Enterprise Edition SP1 x64
Regional and Language Options

3. Project can reproduce the issue

All code about this problem, a simple project which can reproduce this problem will be better.

4. Test Document or Test data

Please provide your test document to us if convenient, it may help us reproduce your issue quickly. We promise to keep your document confidential and we will not use it for any other purpose. Besides, you could also remove the security data of your document and then send it to us.

Many thanks.
Best wishes,
Amy
E-iceblue support team
User avatar

amy.zhao
 
Posts: 2766
Joined: Wed Jun 27, 2012 8:50 am

Return to Spire.PDF