When trying to import a document containing bookmark and BookmarkRangeEnd is after the last paragraph, a StackOverflowException is thrown in IntervalNode while trying to rebuild the document cache. (RadDocumentChildrenCache.RebuildTree()). The same could be observed if the bookmark end is last in the header/footer, between table cells in the RadDocument body, or when all paragraphs after the bookmark range end are hidden (with vanish property). Workaround: Detect the problematic annotations and remove them: foreach (var rangeStart in document.EnumerateChildrenOfType<AnnotationRangeStart>()) { if (rangeStart.End == null || rangeStart.End.Parent == null || rangeStart.End.Parent.Parent == null) { //MessageBox.Show("This indicates a problem."); rangeStart.Parent.Children.Remove(rangeStart); } } Note: Until 2017 R2 SP1 release StackOverflowException is thrown, after this release an ArgumentException should be thrown.
Performance is slow when importing document containing many hyperlink fields from RTF and Docx formats.
When image watermark is set and its height is configured through DocumentWatermarkSettings.ImageSettings.Size.Height, the height is not respected. Steps to reproduce: 1. Insert a Watermark with size var watermarkSettings = new DocumentWatermarkSettings() { Type = WatermarkType.ImageWatermark, ImageSettings = new WatermarkImageSettings() { UriSource = new Uri("c:\1.jpg"), Size = new Size(200, 300) } }; Expected: The image is with the specified width and height. Actual: The height is different.
When a span or text is placed in <a> tag, but 'href' and 'name' attributes are missing, then the span/text is not imported from the HTML document. Workaround: preprocess the HTML and add the 'href' attribute to all <a> elements. Steps to reproduce: 1. Import the following HTML: <html> <body> <a target="_blank">Some text</a> </body> </html> Expected: The hyperlink "Some text" is imported in the document. Actual: The span "Some text" is not imported.
When TextOptions.TextFormattingMode="Display" is set on RadRichTextBox, incorrect Measuring causes TextBlocks to not visualize correctly.
Clicking on floating Image when the caret position is not in the viewport, changes the viewport and starts image dragging. Instead, the image should just be selected. Steps to reproduce: 1. Start with empty document 2. Insert image, make it floating (right-click on it, select Text Wrapping -> In Front Of Text) 3. Drag the image near the bottom of the document. 4. Scroll and, if needed, zoom to such a factor, so that the first paragraph is outside of the view port. 5. Select the image (keep in mind that the image shouldn't be selected - the position should be at some of the previous paragraphs) Observe: The image dragging adorner is visible and the viewport is changed. Expected: The behavior shall be the same as MS Word - the viewport shouldn't be changed, and the image should just be selected
Section break formatting symbol is not positioned as in MS Word. For example, when section break is inserted in an empty document and the cursor is placed before the break, when Enter is pressed, the section break formatting symbol is moved to the next line. In MS Word, the section break is preserved on the same line with the paragraph symbol.
The invalid document can't be measured and IndexOutOfRangeException/NullReferenceException will be thrown.
Possible workaround is to change the document of RadRichTextBox.
When the LevelText of the list style is empty, PdfFormatProvider throws an IndexOutOfRangeException while trying to draw the bullet. Workaround: Ensure that the LevelText of the ListItemStyle is not an empty string: foreach (ListStyle listStyle in this.radRichTextBox.Document.ListManager.GetAllListStyles()) { foreach (ListLevelStyle level in listStyle.Levels) { if (string.IsNullOrEmpty(level.LevelText)) { level.LevelText = " "; } } }
When floating image is all of the following: - is anchored to paragraph inside a table with negative offset. - is with text wrapping "Behind text" or "In front of text" it should be positioned outside of the table. Currently the image is always positioned fully inside the table.
The TableStylesGallery keeps a reference to the document, which doesn't allow the GC to collect it. The issue is reproducible when the document is loaded in RadRichTextBox in the constructor of the window or in its Loaded event.
When a paragraph is styled in HTML format with line-height it should be with AtLeast line spacing type instead of Exact. The same thing happens when the line-height is specified as normal: style="line-height: normal;".