Issue in rtf file import

1 Answer 48 Views
Interesting resources Let's talk about telerik (the good and the bad) My glory with telerik controls
Musthafa
Top achievements
Rank 1
Musthafa asked on 27 Jul 2023, 08:11 AM | edited on 27 Jul 2023, 11:54 AM
i am try to import rtf file with header and footer images it throw the following error,

   at System.ThrowHelper.ThrowKeyNotFoundException()
   at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
   at Telerik.Windows.Documents.Flow.FormatProviders.Html.Model.Elements.Lists.HtmlExportListManager.ShouldRestartLevel(List list, Int32 listLevelIndex)
   at Telerik.Windows.Documents.Flow.FormatProviders.Html.Model.HtmlContentManager.<ExportParagraph>d__1f.MoveNext()
   at Telerik.Windows.Documents.Flow.FormatProviders.Html.Model.HtmlContentManager.<ExportBlockContainer>d__b.MoveNext()
   at Telerik.Windows.Documents.Flow.FormatProviders.Html.Model.Elements.BodyElement.<OnEnumerateInnerElements>d__0.MoveNext()
   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.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.Export(IHtmlWriter writer, IHtmlExportContext context)
   at Telerik.Windows.Documents.Flow.FormatProviders.Html.HtmlFormatProvider.ExportOverride(RadFlowDocument document, Stream output)
   at Telerik.Windows.Documents.Common.FormatProviders.TextBasedFormatProviderBase`1.Export(T document)
   at Unite.Infrastructure.SQL.Repositories.ConsentRepository.GetHtmlFromDocument(RadFlowDocument document) in D:\WorkSpace\Unite2.0\Dev Branch\Unite\Unite.Infrastructure.SQL\Repositories\ConsentRepository.cs:line 337

1 Answer, 1 is accepted

Sort by
0
Vladislav
Telerik team
answered on 27 Jul 2023, 08:50 AM

Hi Musthafa,

It seems the exception is thrown when the document is exported to HTML (judging by the attached call stack). We have already fixed an issue with a similar call stack - WordsProcessing: HtmlFormatProvider: KeyNotFoundException while exporting list whose first level has RestartAfterLevel=0. The fix for it is available in version R3 2021 of our libraries or later. The only way around this issue is to update the assemblies. If the issue persists after updating to the latest version, I will kindly ask you to provide us with a small sample project in which the described behavior is observed.

I hope you will find this information helpful. Do not hesitate to contact us, should you have any other questions.

Regards,
Vladislav
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
Interesting resources Let's talk about telerik (the good and the bad) My glory with telerik controls
Asked by
Musthafa
Top achievements
Rank 1
Answers by
Vladislav
Telerik team
Share this question
or