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)