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.

Fri Dec 01, 2017 3:20 pm

Hi,

We are using SpireDocs in an ASP.net application working with Word based documents, stored as byte arrays. If the document contains either a footnote or endnote, it causes the following code to hang:

pConvert.LoadFromStream(New MemoryStream(pFileDocument.FileData), Spire.Doc.FileFormat.Docx2013)

pConvert is of type Document.

Obviously in the environment we are deployed to (IIS website), we cannot have the application pool hung, spiking the CPU. It makes the entire machine unusable for other services and websites hosted by it.

We are running SpireDocs v6.0.52.4040

Please help!
Thx,
Jay

jblair@catic.com
 
Posts: 8
Joined: Fri Aug 04, 2017 1:07 pm

Mon Dec 04, 2017 3:44 am

Hello,

Thanks for your inquiry.
To help us with a better investigation, could you please send your sample document to us(support@e-iceblue.com)?
Don't worry, we take customers’ confidential information as seriously as them and will never publish or disclose anything related.

Sincerely,
Jane
E-iceblue support team
User avatar

Jane.Bai
 
Posts: 1156
Joined: Tue Nov 29, 2016 1:47 am

Mon Dec 04, 2017 2:57 pm

Thank-you for your response Jane. I have sent a very simple document that causes the problem to the email address you mentioned.

I look forward to hearing from you!
Thx,
Jay

jblair@catic.com
 
Posts: 8
Joined: Fri Aug 04, 2017 1:07 pm

Tue Dec 05, 2017 2:22 am

Hello Jay,

Thanks for your email.
Sorry I didn’t reproduce the issue on my side. Please make sure the byte data you fetched from the database is correct.
You could use the code
Code: Select all
System.IO.File.WriteAllBytes(@"c:\test.docx", pFileDocument.FileData);
to have a check.
If the issue still exists, please write back and give more detail on the project environment.

Sincerely,
Jane
E-iceblue support team
User avatar

Jane.Bai
 
Posts: 1156
Joined: Tue Nov 29, 2016 1:47 am

Tue Dec 05, 2017 2:57 pm

Hi Jane,
I have sent you a zip file containing a Visual Studio 2017 solution. It is just a console app that imports Spire.doc from nuget, and has 6 lines of code. It also contains the test.docx file, which I wrote from our ASP.Net application as you requested.

That test.docx looks fine in Word 2016. It has the endnote that is causing the problem.

All this project does is ready test.docx, and then call Document.LoadFromStream. It then hangs.

I figured if we could reproduce it in as simple an environment as possible that would make things much easier.

One thing I noticed:

If I replace the endnote in the doc with a footnote, or a new endnote, it works in this simple application (not the full ASP.Net application)

However, since this is a web based application meant to be used by any number of people, I cannot have it hanging and bringing down my entire web host.

What I really need is for spire.doc not to hang. Even if it throws an error, that is a much better scenario that we can handle.

Please let me know if you need anything else from me.
Thx,
Jay

jblair@catic.com
 
Posts: 8
Joined: Fri Aug 04, 2017 1:07 pm

Wed Dec 06, 2017 5:57 am

Hello Jay,

Thanks for sharing your document.
I have reproduced the issue and logged it in our bug tracking system. Once it has been fixed, I will inform you.
Sorry for the inconvenience caused.

Sincerely,
Jane
E-iceblue support team
User avatar

Jane.Bai
 
Posts: 1156
Joined: Tue Nov 29, 2016 1:47 am

Thu Dec 07, 2017 5:03 pm

Thanks for the update Jane.

Do you have any idea when this might be fixed?

We were hoping to go live with our web application this month, but I cannot with this issue.

Depending on when it might be fixed, we will need to decide if we have to pull Spire.docs out of the application and move in a different direction.

Any information would be greatly appreciated.
Thank-you!
Jay

jblair@catic.com
 
Posts: 8
Joined: Fri Aug 04, 2017 1:07 pm

Fri Dec 08, 2017 2:01 am

Hello Jay,

Thanks for your response.
I got the news from our dev team that your issue has already been resolved and it is in the testing phase.
Sorry there's no ETA available at present because some unexpected issues might occur during the final testing. Anyway, we will try our best to provide the hotfix ASAP.

Sincerely,
Jane
E-iceblue support team
User avatar

Jane.Bai
 
Posts: 1156
Joined: Tue Nov 29, 2016 1:47 am

Fri Dec 08, 2017 1:46 pm

That is great to hear!

Thanks so much for the update, and thanks to you and your team!
-Jay

jblair@catic.com
 
Posts: 8
Joined: Fri Aug 04, 2017 1:07 pm

Fri Dec 08, 2017 1:59 pm

Hi Jane,

Sorry, one more question. Will you notify me when the fix is available?

Thx,
Jay

jblair@catic.com
 
Posts: 8
Joined: Fri Aug 04, 2017 1:07 pm

Mon Dec 11, 2017 2:00 am

Hello Jay,

Sorry for the late reply.
I will definitely let you know when the hotfix is available.

Sincerely,
Jane
E-iceblue support team
User avatar

Jane.Bai
 
Posts: 1156
Joined: Tue Nov 29, 2016 1:47 am

Mon Dec 11, 2017 1:49 pm

Excellent, again, thank-you!

jblair@catic.com
 
Posts: 8
Joined: Fri Aug 04, 2017 1:07 pm

Thu Dec 14, 2017 2:49 am

Hello,

Glad to inform that your issue has been resolved and the hotfix (Spire.Doc Pack(hot fix) Version:6.0.77) is available now. Kindly note when writing the bytes, you need to use mem.ToArray() to get all the data rather than GetBuffer() for only the data in buffer area.
Code: Select all
string outputFile = @"output.pdf";
string inputFile = @"input.docx";
var bytes = System.IO.File.ReadAllBytes(inputFile);
var doc = new Document();
var mem = new MemoryStream();
doc.LoadFromStream(new MemoryStream(bytes), FileFormat.Docx2013);
doc.SaveToStream(mem, Spire.Doc.FileFormat.PDF);
File.WriteAllBytes(outputFile, mem.ToArray());
doc.Close();


Sincerely,
Jane
E-iceblues support team
User avatar

Jane.Bai
 
Posts: 1156
Joined: Tue Nov 29, 2016 1:47 am

Tue Dec 19, 2017 3:49 pm

Hi!

First impression is that it's working as expected!

We're going to go through more testing.

Thank-you for your assistance!
-Jay

jblair@catic.com
 
Posts: 8
Joined: Fri Aug 04, 2017 1:07 pm

Wed Dec 20, 2017 1:28 am

Hello Jay,

Thanks for your valuable feedback.
Welcome to contact us if you need any help.

Sincerely,
Jane
E-iceblue support team
User avatar

Jane.Bai
 
Posts: 1156
Joined: Tue Nov 29, 2016 1:47 am

Return to Spire.Doc