NullReferenceException is thrown when trying to import a nested hyperlink, e.g. the following OOXML: <w:hyperlink r:id="rId4" w:history="1"> <w:hyperlink r:id="rId5" w:history="1"> <w:r> <w:rPr> <w:rStyle w:val="Hyperlink"/> <w:rFonts w:eastAsia="Times New Roman"/> </w:rPr> <w:t>google</w:t> </w:r> </w:hyperlink> </w:hyperlink>
Characters defined with their unicode codes in HTML won't be imported as symbols, but instead of their codes, for example: <span>料</span> <span>資</span> Some of these characters are often used, for example for umlauts (Ä, Ö, Ü) and CJK characters. The hexadecimal code for Zero Width Space character is split into two parts: <span>​</span> results in Ȁb;
Creating deep copy using CreateDeepCopy method of an empty Section (without paragraphs or with one empty paragraph) adds empty string Span which leads to ArgumentOutOfRangeException. Workaround: clear the empty string Spans before measuring: foreach (Span span in sectionClone.EnumerateChildrenOfType<Span>().ToList()) { if (string.IsNullOrEmpty(span.Text)) { ((Paragraph)span.Parent).Inlines.Remove(span); } } Steps to reproduce: 1. Execute the following code-snippet: RadDocument document = new RadDocument(); Section section = new Section(); section.Blocks.Add(new Paragraph()); document.Sections.Add(section); RadDocument documentClone = (RadDocument)document.CreateDeepCopy(); Section sectionClone = (Section)section.CreateDeepCopy(); documentClone.Sections.Clear(); documentClone.Sections.Add(sectionClone); documentClone.EnsureDocumentMeasuredAndArranged(); 2. Set the documentClone to a RadRichTextBox instance to visualize it. 3. Try to click in the document. Observe: ArgumentOutOfRangeException is thrown.
Inserting DocumentFragment into RadDocument leads to loss of style definitions from the fragment which names are the same as some of the styles in the RadDocument's style repository. This causes loss of formatting of the text in the document fragment. For example if in the fragment there is a style with style name "Style_1" and in the RadDocument exists a style with the same name, that style will be omitted during the insertion of the fragment into the document. Workaround: Styles in the fragment could be renamed to avoid naming conflict with styles in the main document. For example, add the following code snippet right after the importing of the document and before the creation of the fragment: string styleSuffix = "_1"; foreach (var importedStyle in rtfDoc.StyleRepository) { importedStyle.Name = string.Concat(importedStyle.Name, styleSuffix); } This will automatically change the styles of all elements with the renamed styles.
Loading/editing document with large lists (with 1561 or more items) throws IndexOutOfRangeException when incorrectly tries to convert numbering to letters. Workaround: Change list type to one which does not include letter NumberingFormat in any of its levels, for example Numbered Hierarchical or custom one.
Pressing Tab/Shift+Tab when caret position is at the beginning of a paragraph should change current paragraph FirstLineIndent instead of LeftIndent. First line indent should be changed with Document.DefaultTabWidth step. Workaround (using PreviewEditorKeyDown): in the attached file.
This scenario is not valid according to the HTML specification, but exception shouldn't be thrown. Steps to reproduce: - Try to import the following HTML: <html> <body> <p style="font-size = 9px">Simple Test</p> </body> </html> Observed: A NullReferenceException is thrown.
If style is applied to some document elements and this style is deleted through the Change Styles dialog, currently visible document elements (paragraph, spans) are not affected and retain the formatting as if the style is still applied. Steps to reproduce: - Add some text - Select the text and create new style with distinguishable formatting, e.g. red forecolor. The style is applied to the selected text. - Delete the style Expected: the paragraph gets Normal style, and its forecolor becomes the default black one. Actual: the Paragraph has still the custom paragraph styling
When a RadDocument is created programmatically and its layout mode is set to Flow, the export to PDF doesn't respect section properties.
The tab is inserted from the wrong side when the paragraph is with RTL direction.
Currently, exporting to HTML serializes the containers by exporting them to XAML and adding them in a comment in the HTML. There are InlineUIContainerImporting and InlineUIContainerImported events, but the Handled property of the importing event arguments is read-only. This prevents users from creating their own serialization/deserialization logic. Steps to reproduce: 1. Subscribe to events of the format provider: HtmlFormatProvider prov = DocumentFormatProvidersManager.GetProviderByExtension("html") as HtmlFormatProvider; prov.ExportSettings.InlineUIContainerExporting += ExportSettings_InlineUIContainerExporting; prov.ImportSettings.InlineUIContainerImporting += ImportSettings_InlineUIContainerImporting; prov.ImportSettings.InlineUIContainerImported += ImportSettings_InlineUIContainerImported; 2. Insert inline UI container in the document and export it to HTML. InlineUIContainerExporting event is raised and you can set the CommentContent property of the args to custom value. 3. Import the document back in the control Expected: It should be possible to set the Handled property of the importing event args to true, and assign your desired value to the InlineUIContainer property. Actual: InlineUIContainerImporting event is raised, but all properties of the event arguments have private setters.
When document is Web layout mode (LayoutMode = Flow), table with LayoutMode = AutoFit is exported to RTF with wrong column widths. MS Word visualize such table splashed, and WordPad extremely large. Workaround: Performing layout on the document in Paged layout mode seems to fix the issue: var doc = new XamlFormatProvider().Import(file); doc.LayoutMode = Telerik.Windows.Documents.Model.DocumentLayoutMode.Paged; doc.EnsureDocumentMeasuredAndArranged(); doc.LayoutMode = Telerik.Windows.Documents.Model.DocumentLayoutMode.Flow;
When the 'font-family' CSS attribute's value contains Chinese, Japanese or Korean symbols, the HTML parser could not parse them correctly, and the applied font families are skipped. As a result, the text is imported with Arial font. Steps to reproduce: - Register the following font "HGS明朝B": FontFamily myCustomFont = new FontFamily("HGS明朝B"); FontManager.RegisterFont(myCustomFont); - Write some text and apply the font over the text. - Export to HTML. - Import the HTML. Expected: the text should be with the HGS明朝B font family. Actual: the text is with Arial font family
Selection geometry is not rectangular when the selection contains paragraphs with specific fonts and indents, e.g. two empty paragraphs with with font family Georgia and the second one having First Line Indent = 6 px. Steps to reproduce: - Add 3 empty paragraphs - Select the first 2 and apply font family Georgia - Apply First line indent of 6 px to the second paragraph - Select all Expected: The selection geometry should be rectangular. Actual: The selection geometry is not a rectangle.
When a table is auto fitted its cells are exported with incorrect width value. An additional requirement is the cells to not have any preferred width (NULL). This problem will occur only if the document is converted directly from one format to another. Possible workaround is to apply auto preferred width to all cells in that table.
The table width value is exported with different decimal separator depending on the used culture. One the problem is fixed the width value should be exported with invariant culture.
The flow direction of a paragraph is automatically changed to right-to-left if all spans in the paragraph are in the right-to-left mode when importing from DOCX format.
Pressing Enter in the first empty cell in the second table of two adjoined tables adds the paragraph between the tables. Instead, the paragraph should be added in the cell. Steps to reproduce: - Add two tables. - Remove the paragraph between them (using the Delete key). - Add paragraph in the first cell of the second table. Expected: The paragraph is added in the cell. Actual: The tables are separated by paragraph.
Inserting a single-cell table with top border is a common workaround for the missing 'horizontal line' functionality. Exporting such table to PDF causes wrong result if the intercepting vertical borders are of type None and have smaller thickness. Attached image outlines the issue. Workaround: Set the same thickness to the noBorder and to the visible border: var t = new Telerik.Windows.Documents.Model.Table(1, 1);\ var noBorder = new Telerik.Windows.Documents.Model.Border(3, BorderStyle.None, Colors.Black); t.Borders = new TableBorders(noBorder, new Telerik.Windows.Documents.Model.Border(3, BorderStyle.Single, Colors.Black), noBorder, noBorder); Steps to reproduce: 1. Insert table with the following code: var t = new Telerik.Windows.Documents.Model.Table(1, 1); var noBorder = new Telerik.Windows.Documents.Model.Border(BorderStyle.None); t.Borders = new TableBorders(noBorder, new Telerik.Windows.Documents.Model.Border(3, BorderStyle.Single, Colors.Black), noBorder, noBorder); this.radRichTextBox.InsertTable(t); 2. Export to PDF
If there is sequence with more than one font info which is not declared in a separate group, they all are concatenated and recorded in the imported fonts as a single one with id from the last one. Here is such a problematic font table group: {\\fonttbl\\f0\\froman\\fcharset0 Times New Roman;\\f1\\froman\\fcharset0 Times New Roman;\\f2\\froman\\fcharset0 Times New Roman;\\f3\\froman\\fcharset0 Times New Roman;\\f4\\froman\\fcharset0 Times New Roman;\\f5\\froman\\fcharset0 Times New Roman;}