Hi;
I'm having problems, when I try to export with HtmlFormatProvider the OpenOffice/LibreOffice docx files.
If the file is created with MSWord there's no problems, all works fine, the problem is with LibreOffice/Openoffice generated-documents.
Please, I need help 'cause some of my customers uses LibreOffice to create the docx documents.
+++++++++++++++++++++++ CODE ++++++++++++++++++++++++++
docxProvider = new DocxFormatProvider();
htmlProvider = new HtmlFormatProvider();
if(this._DocXByteArray == null)
this._DocXByteArray = System.IO.File.ReadAllBytes(this._DocXPath);
document = docxProvider.Import(this._DocXByteArray);
htmlProvider.ExportSettings.DocumentExportLevel = DocumentExportLevel.Fragment;
htmlProvider.ExportSettings.ImagesExportMode = ImagesExportMode.Embedded;
htmlProvider.ExportSettings.StylesExportMode = StylesExportMode.Embedded;
string html = htmlProvider.Export(document); //heres crash with the down error trace
+++++++++++++++++++++++ CODE ++++++++++++++++++++++++++
I'm always getting this error
++++++++++++++++++++++++ ERROR TRACE ++++++++++++++++++++++++
at Telerik.Windows.Documents.Flow.FormatProviders.Html.Model.Elements.ParagraphElementBase.GetDefaultStyleId(IHtmlExportContext context, String& styleId)
at Telerik.Windows.Documents.Flow.FormatProviders.Html.Model.Elements.HtmlElementBase.CopyStyleFrom(IHtmlExportContext context, IElementWithStyle element)
at Telerik.Windows.Documents.Flow.FormatProviders.Html.Model.Elements.ParagraphElementBase.OnBeforeWrite(IHtmlWriter writer, IHtmlExportContext context)
at Telerik.Windows.Documents.Flow.FormatProviders.Html.Model.Elements.HtmlElementBase.Write(IHtmlWriter writer, IHtmlExportContext context)
at Telerik.Windows.Documents.Flow.FormatProviders.Html.Model.Elements.HtmlElementBase.WriteContent(IHtmlWriter writer, IHtmlExportContext context)
at Telerik.Windows.Documents.Flow.FormatProviders.Html.Model.Elements.HtmlElementBase.Write(IHtmlWriter writer, IHtmlExportContext context)
at Telerik.Windows.Documents.Flow.FormatProviders.Html.Export.HtmlExporter.ExportDocumentFragment(IHtmlWriter writer, IHtmlExportContext context)
at Telerik.Windows.Documents.Flow.FormatProviders.Html.Export.HtmlExporter.Export(IHtmlWriter writer, IHtmlExportContext context)
at Telerik.Windows.Documents.Flow.FormatProviders.Html.HtmlFormatProvider.ExportOverride(RadFlowDocument document, Stream output)
at Telerik.Windows.Documents.Common.FormatProviders.FormatProviderBase`1.Export(T document, Stream output)
at Telerik.Windows.Documents.Common.FormatProviders.TextBasedFormatProviderBase`1.Export(T document)
++++++++++++++++++++++++ END ERROR TRACE ++++++++++++++++++++++++
Thx
I'm having problems, when I try to export with HtmlFormatProvider the OpenOffice/LibreOffice docx files.
If the file is created with MSWord there's no problems, all works fine, the problem is with LibreOffice/Openoffice generated-documents.
Please, I need help 'cause some of my customers uses LibreOffice to create the docx documents.
+++++++++++++++++++++++ CODE ++++++++++++++++++++++++++
docxProvider = new DocxFormatProvider();
htmlProvider = new HtmlFormatProvider();
if(this._DocXByteArray == null)
this._DocXByteArray = System.IO.File.ReadAllBytes(this._DocXPath);
document = docxProvider.Import(this._DocXByteArray);
htmlProvider.ExportSettings.DocumentExportLevel = DocumentExportLevel.Fragment;
htmlProvider.ExportSettings.ImagesExportMode = ImagesExportMode.Embedded;
htmlProvider.ExportSettings.StylesExportMode = StylesExportMode.Embedded;
string html = htmlProvider.Export(document); //heres crash with the down error trace
+++++++++++++++++++++++ CODE ++++++++++++++++++++++++++
I'm always getting this error
++++++++++++++++++++++++ ERROR TRACE ++++++++++++++++++++++++
at Telerik.Windows.Documents.Flow.FormatProviders.Html.Model.Elements.ParagraphElementBase.GetDefaultStyleId(IHtmlExportContext context, String& styleId)
at Telerik.Windows.Documents.Flow.FormatProviders.Html.Model.Elements.HtmlElementBase.CopyStyleFrom(IHtmlExportContext context, IElementWithStyle element)
at Telerik.Windows.Documents.Flow.FormatProviders.Html.Model.Elements.ParagraphElementBase.OnBeforeWrite(IHtmlWriter writer, IHtmlExportContext context)
at Telerik.Windows.Documents.Flow.FormatProviders.Html.Model.Elements.HtmlElementBase.Write(IHtmlWriter writer, IHtmlExportContext context)
at Telerik.Windows.Documents.Flow.FormatProviders.Html.Model.Elements.HtmlElementBase.WriteContent(IHtmlWriter writer, IHtmlExportContext context)
at Telerik.Windows.Documents.Flow.FormatProviders.Html.Model.Elements.HtmlElementBase.Write(IHtmlWriter writer, IHtmlExportContext context)
at Telerik.Windows.Documents.Flow.FormatProviders.Html.Export.HtmlExporter.ExportDocumentFragment(IHtmlWriter writer, IHtmlExportContext context)
at Telerik.Windows.Documents.Flow.FormatProviders.Html.Export.HtmlExporter.Export(IHtmlWriter writer, IHtmlExportContext context)
at Telerik.Windows.Documents.Flow.FormatProviders.Html.HtmlFormatProvider.ExportOverride(RadFlowDocument document, Stream output)
at Telerik.Windows.Documents.Common.FormatProviders.FormatProviderBase`1.Export(T document, Stream output)
at Telerik.Windows.Documents.Common.FormatProviders.TextBasedFormatProviderBase`1.Export(T document)
++++++++++++++++++++++++ END ERROR TRACE ++++++++++++++++++++++++
Thx