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.

Wed Nov 02, 2016 5:59 pm

Hello,

With spire.doc version 5.8.0.3040 and spire.pdf version 3.8.20.3040 this code genereate this error while executing third line ( document.GetText) (.docx file have been attached) :

Thanks:

Code: Select all
   Spire.Doc.Document document = new Spire.Doc.Document();
   document.LoadFromFile("c:\\temp\\test2.docx");
   string tp = document.GetText();


ERROR :
Object reference not set to an instance of an object.
at spr↧.ᜀ(Symbol A_0)
at spr↧.ᜀ(IParagraph A_0, Boolean A_1)
at spr↧.ᜀ(IBody A_0)
at spr↧.ᜀ(ITable A_0)
at spr↧.ᜀ(IBody A_0)
at spr↧.ᜀ()
at spr↧.ᜀ(Document A_0)
at OIQ.Inspection2016.Services.Service.FuzionWord(Byte[] bytes, List`1 variables, Boolean convertToPDF, Boolean replaceNullMarkersWithBlank)
at OIQ.Inspection2016.Web.Controllers.BaseController.GetFileByDocrefId(Guid docrefId, Guid dossierId)
at lambda_method(Closure , ControllerBase , Object[] )
at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass42.b__41()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass37.<>c__DisplayClass39.b__33()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass4f.b__49()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass37.b__36(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass25.<>c__DisplayClass2a.b__20()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass25.b__22(IAsyncResult asyncResult)
Robin Leblond
.Net Consultant, Montréal, Qc, Canada

robinleblond
 
Posts: 22
Joined: Fri Jan 29, 2016 5:46 pm

Thu Nov 03, 2016 2:12 am

Hi Robin,

Thanks for your feedback.
I have reproduced the issue and posted it to our Dev team. We will inform you when it is fixed.
Sorry for inconvenience caused.

Sincerely,
Betsy
E-iceblue support team
User avatar

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

Thu Nov 03, 2016 12:58 pm

Thanks!
Robin Leblond
.Net Consultant, Montréal, Qc, Canada

robinleblond
 
Posts: 22
Joined: Fri Jan 29, 2016 5:46 pm

Mon Nov 07, 2016 9:19 am

Hi Robin,

Thanks for your waiting.
Now the issue has been resolved, welcome to test Spire.Doc Pack(hot fix) Version:5.8.13.
If there is any question, welcome to get it back to us.

Sincerely,
Betsy
E-iceblue support team
User avatar

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

Wed Nov 09, 2016 7:43 pm

Thanks, it work A1 !
Robin Leblond
.Net Consultant, Montréal, Qc, Canada

robinleblond
 
Posts: 22
Joined: Fri Jan 29, 2016 5:46 pm

Thu Nov 10, 2016 1:34 am

Hi Robin,

Thanks for your feedback.
Please feel free to contact us if there is any qeustion.

Sincerely,
Betsy
E-iceblue support team
User avatar

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

Tue Jan 17, 2017 6:29 pm

Hello, I'm getting a similar error with an other file, below is the code and the error. As for the file, I will have to send it to you in a private maner (just tell me how please).

Code: Select all
   byte[] bytes = System.IO.File.ReadAllBytes("c:\\temp\\prob1.docx");
   Spire.Doc.Document document = new Spire.Doc.Document();
   System.IO.MemoryStream inputStream = new System.IO.MemoryStream(bytes);
   document.LoadFromStream(inputStream, Spire.Doc.FileFormat.Auto);
   System.IO.MemoryStream outputStream = new System.IO.MemoryStream();
   Spire.Doc.FileFormat format = document.DetectedFormatType;
   format = Spire.Doc.FileFormat.PDF;
   Spire.Doc.ToPdfParameterList tppl = new Spire.Doc.ToPdfParameterList();
   tppl.PdfConformanceLevel = Spire.Pdf.PdfConformanceLevel.Pdf_A1B;
   document.SaveToStream(outputStream, tppl);


ERROR :

Object reference not set to an instance of an object.
at spr╲.ᜀ(RectangleF A_0)
at spr⚲.ᜄ(spr♃ A_0)
at spr⚲.ᜀ(RectangleF A_0)
at spr⎫.ᜄ(spr♃ A_0)
at spr⚲.ᜀ(RectangleF A_0)
at spr⚲.ᜄ(spr♃ A_0)
at spr⚲.ᜀ(RectangleF A_0)
at sprḡ.ᜀ(spr៶ A_0, spr┾ A_1, sprᨰ A_2)
at spr᪽.ᜋ()
at spr᪽.ᜀ(RectangleF& A_0, RectangleF& A_1, Int32& A_2, Boolean& A_3, Boolean A_4)
at sprḡ.ᜀ(spr៶ A_0, spr┾ A_1, sprᨰ A_2)
at spr᪽.ᜒ()
at spr᪽.ᜁ(IDocument A_0)
at spr⊌.ᜀ(Document A_0)
at Spire.Doc.Document.ᜀ(Stream A_0, ToPdfParameterList A_1)
at OIQ.Inspection2016.Services.Service.FuzionWord(Byte[] bytes, List`1 variables, Boolean convertToPDF, Boolean replaceNullMarkersWithBlank)
at OIQ.Inspection2016.Services.Service.FuzionWord(Byte[] bytes, List`1 variables, Boolean convertToPDF)
at OIQ.Inspection2016.Web.Controllers.BaseController.GetFileByDocumentId(Guid id)
at lambda_method(Closure , ControllerBase , Object[] )
at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass42.b__41()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass37.<>c__DisplayClass39.b__33()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass4f.b__49()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass37.b__36(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass25.<>c__DisplayClass2a.b__20()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass25.b__22(IAsyncResult asyncResult)
Robin Leblond
.Net Consultant, Montréal, Qc, Canada

robinleblond
 
Posts: 22
Joined: Fri Jan 29, 2016 5:46 pm

Wed Jan 18, 2017 2:09 am

Dear robinleblond,

Thanks for your inquiry.
Please send the file to us(support@e-iceblue.com) via email for investigation. We promise to keep it confidential and won't use it for any other purpose.

Sincerely,
Betsy
E-iceblue support team
User avatar

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

Wed Jan 18, 2017 2:46 pm

File sent! :-)
Robin Leblond
.Net Consultant, Montréal, Qc, Canada

robinleblond
 
Posts: 22
Joined: Fri Jan 29, 2016 5:46 pm

Thu Jan 19, 2017 2:13 am

Dear Robin,

Thanks for detailed information.
I have noticed the issue and posted it to our Dev team. We will inform you when it is fixed.
Sorry for inconvenience caused.

Sincerely,
Betsy
E-iceblue support team
User avatar

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

Wed Jan 25, 2017 2:49 pm

Betsy, any update on that ?
Robin Leblond
.Net Consultant, Montréal, Qc, Canada

robinleblond
 
Posts: 22
Joined: Fri Jan 29, 2016 5:46 pm

Thu Jan 26, 2017 5:42 am

Hello,

The exception has get resolved, but sorry that we will be on Chinese New Year holiday from Jan.27, 2017 to Feb.2, 2017 (GMT+8:00). And we will work normally from Feb.3, 2017. The hotfix will be provided when we are back to work.

Sincerely,
Gary
E-iceblue support team
User avatar

Gary.zhang
 
Posts: 1380
Joined: Thu Apr 04, 2013 1:30 am

Tue Feb 28, 2017 7:01 am

Dear Robin,

Sorry for long silence.
Now the hotfix is available, welcome to test Spire.Doc Pack(hot fix) Version:5.8.62.
Looking forward to your feedback.

Sincerely,
Betsy
E-iceblue support team
User avatar

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

Tue Mar 07, 2017 6:47 am

Dear Robin,

Did you test the hotfix ? Has the issue been fixed ?
Could you please give us some feedback at your convenience ?

Thanks,
Betsy
E-iceblue support team
User avatar

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

Wed Mar 08, 2017 6:14 pm

I'm running into the same issue - except that I get the error message when I try to save the file to a FileFormat.PDF. This happens for both the SaveToFile method and the SaveToStream method. The stack trace is pretty much the same for what has already been posted, but I'll present it here again:

at Spire.Doc.Fields.TextRange.ᜂ()
at Spire.Doc.Fields.TextRange.ᜳ()
at Spire.Doc.Fields.TextRange.CreateLayoutInfo()
at Spire.Doc.DocumentBase.Spire.Doc.Layout.IDocumentBase.get_LayoutInfo()
at spr⚵.ᜃ()
at spr⚵.ᜀ(RectangleF A_0)
at spr⎫.ᜄ(spr♆ A_0)
at spr⚵.ᜀ(RectangleF A_0)
at spr⚵.ᜄ(spr♆ A_0)
at spr⚵.ᜀ(RectangleF A_0)
at spr⚵.ᜄ(spr♆ A_0)
at spr⚵.ᜀ(RectangleF A_0)
at sprḕ.ᜀ(spr៳ A_0, spr┿ A_1, sprᨮ A_2)
at spr᪺.ᜒ()
at spr᪺.ᜁ(IDocument A_0)
at spr⊉.ᜀ(Document A_0)
at Spire.Doc.Document.ᜀ(Stream A_0)
at Spire.Doc.Document.SaveToFile(Stream stream, FileFormat fileFormat)
at Spire.Doc.Document.SaveToStream(Stream stream, FileFormat fileFormat)
at PDFServiceLib.Internals.ConvertWord.ConvertFromUrl(String source, String destination) in C:\Code\PDFService\PDFServiceLib\Internals\ConvertWord.cs:line 59

This is after calling the SaveToStream method, the SaveToFile has the same stack trace except it doesn't have the "at Spire.Doc.SaveToStream" line.

I did apply the Version 5.8.62 hot fix but it did not resolve the issue (although I did try the "GetText" method as a test and it didn't have any problem). This appears to only affect when trying to convert to PDF, converting to Text didn't generate any errors.

klukes
 
Posts: 17
Joined: Thu Mar 02, 2017 4:59 pm

Return to Spire.Doc