Greetings,
In my enterprise we have a WPF application, that runs a RadRichTextbox Editor. At the moment, we are migrating our system to web, refactoring all source to a MVC application.
To achieve the same aspects and features that our RadRichTextbox had, we implemented the Telerik RadEditor in ASP.NET.
The problem is that the old documments made on RadRichTextbox and saved as binary, aren't compatible with the RadEditor in ASP.NET.
I tried to convert the binary documments with WPF DLLs docxProvider generating a radflowdocument, and exporting to the editor that same radflowdocument with the HTML provider. The result is an inevitable error that HTML provider doesn't support the binary that converted by the docxProvider from WPF.
I believe that the formats are completly differents and incompatibles, but we need some backward compatibility solution to display this old documents on our ASP.NET Telerik RadEditor.
Here is what we tried to do:
...
var binary = reportResp.Report.File;
Telerik.Windows.Documents.FormatProviders.OpenXml.Docx docxProvider = new using Telerik.Windows.Documents.FormatProviders.OpenXml.Docx;
RadFlowDocument flowDocument = docxProvider.Import(binary);
HtmlFormatProvider htmlProvider = new HtmlFormatProvider(); <--- From Telerik.Windows.Documents.Flow.dll
string result = htmlProvider.Export(flowDocument); <----- error here - flowDocument format not supported by htmlProvider
...
In my enterprise we have a WPF application, that runs a RadRichTextbox Editor. At the moment, we are migrating our system to web, refactoring all source to a MVC application.
To achieve the same aspects and features that our RadRichTextbox had, we implemented the Telerik RadEditor in ASP.NET.
The problem is that the old documments made on RadRichTextbox and saved as binary, aren't compatible with the RadEditor in ASP.NET.
I tried to convert the binary documments with WPF DLLs docxProvider generating a radflowdocument, and exporting to the editor that same radflowdocument with the HTML provider. The result is an inevitable error that HTML provider doesn't support the binary that converted by the docxProvider from WPF.
I believe that the formats are completly differents and incompatibles, but we need some backward compatibility solution to display this old documents on our ASP.NET Telerik RadEditor.
Here is what we tried to do:
...
var binary = reportResp.Report.File;
Telerik.Windows.Documents.FormatProviders.OpenXml.Docx docxProvider = new using Telerik.Windows.Documents.FormatProviders.OpenXml.Docx;
RadFlowDocument flowDocument = docxProvider.Import(binary);
HtmlFormatProvider htmlProvider = new HtmlFormatProvider(); <--- From Telerik.Windows.Documents.Flow.dll
string result = htmlProvider.Export(flowDocument); <----- error here - flowDocument format not supported by htmlProvider
...