Hello
I have just upgraded to the above version. I have a word document that is loading from a db. It no longer loads. I see the following in the console:
I load the document on the OnCreated event of the control as shown below.
Any ideas?
public async void OnCreated(object args)
{
await GetTemplate();
StateHasChanged();
}
public async Task GetTemplate()
{
//Get the data
var it = await InvoiceTemplateDataService.InvoiceTemplateSelectByTemplateName(AppStateService.CurrentUserEmailAddress, "Default");
//Using Doc IO open stream. TemplateData is a byte[]
using Stream stream = new MemoryStream(it.TemplateData);
DocIO.WordDocument document = new DocIO.WordDocument(stream, Syncfusion.DocIO.FormatType.Docx);
using MemoryStream streamnew = new MemoryStream();
document.Save(streamnew, Syncfusion.DocIO.FormatType.Docx);
//Load the stream into a word processing format and throw at the screen
DocEditor.WordDocument documentnew = DocEditor.WordDocument.Load(streamnew, ImportFormatType.Docx);
string json = JsonConvert.SerializeObject(documentnew);
await container.DocumentEditor.Open(json);
}
Hi Ditchford,
Can you please share the input document which you have tried at your end? that will be helpful for us to analyze further and provide you the solution at the earliest.
Note: If you have any confidential data in your Word document, please replace with some dummy data and provide us the same. We just need your document to recreate the problem you face.
Regards,
Suriya M.
Hello
Any updates on this please?
Thank you
Apologies for the delay!
We will update details shortly.
Hi Ditchford,
We tried to reproduce the reported issue at our end but we couldn't.
Please check the attached sample for reference.
Please check and let is know whether you are able to reproduce the reported issue from the shared sample.
If you still facing the issue, Please let us know whether your are using CDN link or min.js link in the layout.cshtml file as source.
Regards,
Ajithamarlin E
Hey Ajithamarlin
Thank you for that. So essentially the control has changed from using Newtsoft to System.Text.Json. I see now that its in the release notes.
Got to say I did a bit of an eye-roll when I saw it was a breaking change, however it was an easy fix with the help of your sample and now I am absolutely blown away by the performance improvment.
Don't know whether this is is to do with System.Text.Json or the change in in the default value of IgnoreScriptIsolation is this volume. Either way, I couldn't be happier with the performance improvement. My documents render pretty much instantly...wow...just wow.
Nice work...thank you.
Hi Ditchford,
We are glad to know that your issue gets resolved. Please let us know if you need any further assistance.
Regards,
Suriya M.