Hi,
When using Memorystream (created from bytes) to create a doc in aspose.words, the Save method is throwing null reference exception. Please let me know how this can be fixed.
byte[] imgdata = null;
string templateName = @"C:\Dev\SearchResultsTemplate.docx";
imgdata = System.IO.File.ReadAllBytes(templateName);
MemoryStream stream = new MemoryStream(imgdata);
Aspose.Words.Document doc = new Aspose.Words.Document(stream);
ReportingEngine engine = new ReportingEngine();
engine.BuildReport(doc, datasources, datasourcenames);
doc.Save(“C:\Aspose\SearchOutput.pdf”); – this line throws null reference exception