Merge all assemblies exept Telerik.WinControls.UI.Design.dll. Use the merged assembly in an application with RichTextEditorRibbonBar. The icons are missing.
When the specified length of the stream is larger than the actual one, Adobe throws errors and removes the image. Workaround: Set the format provider settings: PdfFormatProvider provider = new PdfFormatProvider(); PdfExportSettings exportSettings = new PdfExportSettings(); exportSettings.ContentsDeflaterCompressionLevel = 9; exportSettings.ImagesDeflaterCompressionLevel = 9; provider.ExportSettings = exportSettings;
Workaround: public partial class Form1 : Form { public Form1() { InitializeComponent(); this.radRichTextEditor1.IsSpellCheckingEnabled = true; this.radRichTextEditor1.Insert("SOooome wrrrrong wooooooooords."); this.radRichTextEditor1.CommandExecuted += radRichTextEditor1_CommandExecuted; } bool shouldProcess = true; private void radRichTextEditor1_CommandExecuted(object sender, Telerik.WinForms.Documents.RichTextBoxCommands.CommandExecutedEventArgs e) { if (e.Command is DeleteCommand) { if (shouldProcess) { shouldProcess = false; RichTextEditorInputBehavior behavior = this.radRichTextEditor1.InputHandler; behavior.ProcessKeyDown(new KeyEventArgs(Keys.Back)); } shouldProcess = true; } } }
To reproduce: radRichTextEditor.Document = new RadDocument(); radRichTextEditor.Document.MeasureAndArrangeInDefaultSize(); radRichTextEditor.UpdateEditorLayout(); radRichTextEditor.Document.CaretPosition.MoveToLastPositionInDocument(); var p = new Paragraph(); p.Inlines.Add(new Span("Cell")); var cell = new TableCell(); cell.Blocks.Add(p); var row = new TableRow(); row.Cells.Add(cell); var table = new Table(); table.Rows.Add(row); var section = new Section(); section.Blocks.Add(table); radRichTextEditor.Document.Sections.Add(section); radRichTextEditor.Document.CaretPosition.MoveToLastPositionInDocument(); var provider = new RtfFormatProvider(); var txt = provider.Export(radRichTextEditor.Document); Clipboard.SetText(txt, TextDataFormat.Rtf); Workaround: measure the document after the section is added: radRichTextEditor.Document.Sections.Add(section); radRichTextEditor.Document.MeasureAndArrangeInDefaultSize(); radRichTextEditor.UpdateEditorLayout();
To reproduce: - insert a fragmet from another RichtextEditor like this: private void Button_Click(object sender, RoutedEventArgs e) { radRichTextBox.Document.Sections.Clear(); radRichTextBox.Document.Sections.Add(new Section()); radRichTextBox.Document.CaretPosition.MoveToLastPositionInDocument(); radRichTextBox.DocumentEditor.InsertParagraph(); radRichTextBox.DocumentEditor.InsertFragment(new DocumentFragment(radRichTextEditor1.Document)); radRichTextBox.DocumentEditor.InsertParagraph(); } Workaround: There is no point of resetting the section in such way. Nevertheless, you can avoid the exception by using one of the following methods: radRichTextBox.Document.MeasureAndArrangeInDefaultSize(); radRichTextBox.UpdateEditorLayout();
Local properties are not exported to HTML when style is applied over document element (paragraphs, spans, tables) in case the HtmlExportSettings.StyleExportMode is set to Inline. To reproduce: - Add two hyperlinks with differents font and font weights. - Export them with the following code: private void button1_Click(object sender, EventArgs e) { HtmlFormatProvider html_provider = default(HtmlFormatProvider); string htmlBody = null; html_provider = new HtmlFormatProvider(); html_provider.ExportSettings.StylesExportMode = StylesExportMode.Inline; html_provider.ExportSettings.StyleRepositoryExportMode = StyleRepositoryExportMode.ExportStylesAsCssClasses; htmlBody = html_provider.Export(radRichTextEditor1.Document); File.WriteAllText("test.html", htmlBody); } - Open the file and you will notice that the custom styles are not exported (the links are having the same style). Workaround: html_provider.ExportSettings.StylesExportMode = StylesExportMode.Classes;
1. Open RadRichTexEditor and type the following text: "שדג:3" or open the attached file 2. Save the document as docx file 3. Compare the results in MS Word and in RadRichTexEditor Observed result: in RadRichTexEditor the text is visualized as: ":3שדג" Expected result: The text should be visualized as: "שדג:3"
To reproduce: private void radButton1_Click(object sender, EventArgs e) { var document = new RadDocument(); var section = new Section(); document.Sections.Add(section); var paragraph = new Paragraph(); section.Blocks.Add(paragraph); var span = new Span("BOLD"); span.FontWeight = FontWeights.Bold; paragraph.Inlines.Add(span); span = new Span(" REGULAR"); paragraph.Inlines.Add(span); editor.Document = document; var pdfExporter = new PdfFormatProvider(); var path = Path.GetTempFileName() + ".pdf"; using (var file = File.Create(path)) { pdfExporter.Export(document, file); file.Flush(); file.Close(); } Process.Start(path); } Workaround: export .docx file and use the RadWordsProcessing library to import the .doc file and export it to pdf: private void radButton1_Click(object sender, EventArgs e) { var document = new RadDocument(); var section = new Section(); document.Sections.Add(section); var paragraph = new Paragraph(); section.Blocks.Add(paragraph); var span = new Span("BOLD"); span.FontWeight = FontWeights.Bold; paragraph.Inlines.Add(span); span = new Span(" REGULAR"); paragraph.Inlines.Add(span); editor.Document = document; var wordExporter = new Telerik.WinForms.Documents.FormatProviders.OpenXml.Docx.DocxFormatProvider(); var wordPath = Path.GetTempFileName() + ".doc"; using (var file = File.Create(wordPath)) { wordExporter.Export(document, file); file.Flush(); file.Close(); } Telerik.Windows.Documents.Flow.FormatProviders.Docx.DocxFormatProvider provider = new Telerik.Windows.Documents.Flow.FormatProviders.Docx.DocxFormatProvider(); using (Stream input = File.OpenRead(wordPath)) { Telerik.Windows.Documents.Flow.Model.RadFlowDocument doc = provider.Import(input); Telerik.Windows.Documents.Flow.FormatProviders.Pdf.PdfFormatProvider pdfProvider = new Telerik.Windows.Documents.Flow.FormatProviders.Pdf.PdfFormatProvider(); string filePath = @"..\..\" + DateTime.Now.ToLongTimeString().Replace(":", "-"); using (var output = File.Create(filePath)) { pdfProvider.Export(doc, output); } Process.Start(filePath); } }
To reproduce: - Copy the content from the attached document - do not copy the last row. - Remove the bookmarks like this: bookmarks = radRichTextEditor1.Document.GetAllBookmarks().ToArray(); foreach (BookmarkRangeStart item in bookmarks) { radRichTextEditor1.Document.GoToBookmark(item); radRichTextEditor1.DocumentEditor.DeleteBookmark(item); } Workaround: var invalidStarts = this.radRichTextBox.Document .EnumerateChildrenOfType<BookmarkRangeStart>() .Where(start => start.End == null) .ToList(); foreach (var invalidStart in invalidStarts) { invalidStart.Parent.Children.Remove(invalidStart); } Note that when this workaround is used the document history will be deleted as well, which means that the undo operation will no longer hold information for previous operations