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.

Tue Nov 03, 2020 9:31 am

Hello everyone!
C# when exec "Spire.Doc.Document.SaveToStream" goes into error with attached file (docx file with comments). The error is "System.StackOverflowException".
Instead the same file without comments works perfectly.
Can someone help me?
Thanks :D

Marghez97
 
Posts: 2
Joined: Tue Nov 03, 2020 9:10 am

Tue Nov 03, 2020 10:52 am

Hello,

Thanks for your post.
I tested the following code with our latest Spire.Doc Pack(hot fix) Version:8.10.4, but didn't reproduce your issue. It could work well. Thus, I suggest that you try again with this latest version firstly. If your issue still exists. To help further look into it, please share us with your system information (E.g. Win7, 64 bit) and region setting (E.g. China, Chinese).
Code: Select all
 Document wordDocument = new Document();
 wordDocument.LoadFromFile(@"Con i commenti.docx");
 MemoryStream stream = new MemoryStream();
 wordDocument.SaveToStream(stream, Spire.Doc.FileFormat.PDF);
 wordDocument.SaveToStream(stream, Spire.Doc.FileFormat.Docx);

Sincerely,
Lisa
E-iceblue support team
User avatar

Lisa.Li
 
Posts: 1534
Joined: Wed Apr 25, 2018 3:20 am

Thu Nov 05, 2020 8:58 am

THe S.O. is WIndows 10 64 bit, The region is Italy.
Thanks for your support!

Marghez97
 
Posts: 2
Joined: Tue Nov 03, 2020 9:10 am

Thu Nov 05, 2020 11:07 am

Hello,

Thanks for your more information.
I tested this case in the environment as yours, but still didn't reproduce this issue. Here, I uploaded my .exe Demo, please run it on your side dreictly and then let us know your testing result. Look forward to your further feedback.

Sincerely,
Lisa
E-iceblue support team
User avatar

Lisa.Li
 
Posts: 1534
Joined: Wed Apr 25, 2018 3:20 am

Wed Nov 11, 2020 3:16 am

Hello,

Greetings from E-iceblue.
Did my .exe Demo work for you? Thanks in advance for your feedback and time.

Sincerely,
Lisa
E-iceblue support team
User avatar

Lisa.Li
 
Posts: 1534
Joined: Wed Apr 25, 2018 3:20 am

Return to Spire.PDF

cron