Spire.Doc is a professional Word .NET library specifically designed for developers to create, read, write, convert and print Word document files. Get free and professional technical support for Spire.Doc for .NET, Java, Android, C++, Python.

Mon Oct 30, 2017 9:18 pm

Hello,
I'm currently having an issue with spire.doc which is when i upload a .doc file
I have a huge spike in memory from 300 MB to 1.5gb per .doc file it seems like its only .doc files the file size is 15mb
but it keeps hanging and if there are multiple users online it will crash the site if they all upload documents around the same time+

Code: Select all
Document document = new Document();
document.LoadFromFile(Server.MapPath("~/images/docs/" + fullfilename));
document.SaveToFile(Server.MapPath("~/images/docs/" + TemplateNameOnly + ".pdf"),Spire.Doc.FileFormat.PDF);
document.Close();


the top one loads the .doc and converts to .pdf NOTE: this only happens with .doc files as well
this is where it seems to be using up the memory

i am also using the latest patch from spire.doc and spire.pdf and im on .net 4.0

djacobs111
 
Posts: 12
Joined: Mon Aug 01, 2016 6:13 pm

Tue Oct 31, 2017 7:42 am

Hi djacobs111,

Thanks for your inquiry.
First we suggest you use the PS method with the latest Spire.Office Platinum (DLL Only) Version:2.16.18 to convert document to PDF, and check if the issue is solved.
Code: Select all
            Document doc = new Document(@"sample.docx");
            ToPdfParameterList toPdf = new ToPdfParameterList();           
            toPdf.UsePSCoversion = true;           
            doc.SaveToFile("result.pdf", toPdf);

If the issue still happens, please provide following information for further investigation.
1. Input document
2. OS information of your computer
3. Which line consumes huge memory, LoadFromFile or SaveToFile ?

Many thanks,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Return to Spire.Doc