When a document containing a field without a separator is inserted using the RadFlowDocumentEditor.InsertDocument(*) method, NullRferenceException is thrown. Workaround: Fix the document before inserting: private static void WorkaroundFieldsIssue(RadFlowDocument flowdocument) { foreach (FieldCharacter fieldCharacter in flowdocument.EnumerateChildrenOfType<FieldCharacter>().ToList()) { // only for start if (fieldCharacter.FieldCharacterType == FieldCharacterType.Start) { if (fieldCharacter.FieldInfo.Separator != null && fieldCharacter.FieldInfo.Separator.Parent == null) { Paragraph parent = fieldCharacter.FieldInfo.End.Paragraph; int index = parent.Inlines.IndexOf(fieldCharacter.FieldInfo.End); fieldCharacter.FieldInfo.End.Paragraph.Inlines.Insert(index, fieldCharacter.FieldInfo.Separator); } } } }
LineInfo objects are not cleared when there are tables in the document being exported to PDF which leads to OutOfMemoryException.
When the table borders are None, and each cell has custom set borders, when cells are merged, only borders of the cell that has <w:vMerge w:val="restart"/> are imported.
When the document contains an image with extension, which is not among the supported ones, a KeyNotFoundException is thrown during Import.
When exporting a nested table, which is inside a table with cells whose sum of widths is more than 100%, the last cells are missing from the exported with PdfFormatProvider document. The issue is not observable in the other format providers.
Add support for importing HTML with syntax <img style="width: 300px; height: 300px;" /> At the moment only HTML attributes are supported.
Currently, the align attribute is supported only for a table and when applied to a cell or row is omitted on import.
There are multiple tags and attributes in the Open XML model which define the formatting of the complex script characters and are not implemented in the WordsProcessing model. Such tags are: szCs: Complex script font size; bCs: Complex script bold; iCs: Complex script italic; Attributes: cstheme: Complex Script Theme Font; The cs (Complex Script Font) attribute is implemented in the export, but it is not preserved in the model on import.
When text content (text in paragraph, text in span) in HTML contains line break (\r, \n, or \r\n), it should be imported as space. Instead, the new lines are currently removed. For example, <p>first\nsecond</p> (line feed between the words) is imported as run with content "firstsecond" instead of "first second".
Applying border="1" to a table element, should set table cells borders to the same value. Currently, only the table borders are set.
When the RowSpan value is bigger than the available rows, a ArgumentOutOfRangeException is thrown while exporting the document. Workaround: Change the value of RowSpan after importing: foreach (var cell in document.EnumerateChildrenOfType<TableCell>()) { while (cell.RowSpan > cell.Row.Table.Rows.Count) { cell.RowSpan--; } }
When a table cell has a smaller width set and inside there is a paragraph with larger indent set or bullets, the table does not expand in order to show the text and the text becomes invisible.
Applying LockAspectRatio to an image is not respected after opening the document in MS Word - the LockAspectRatio checkbox in the is not checked. An additional XML element (cNvGraphicFramePr) should be added so the UI can respect it.
Allow to password-protect a document, so that it cannot be shown (read) without the password. Also, enable opening encrypted documents.
Run's default constructor creates it with Text = null. When document with such run is exported to PDF, NullReferenceException is thrown. Workaround: Create the Run and immediately set its Text property to string.Emtpy. Available in LIB Version 2018.1.423.
Currently there is no easy way to modify the properties of bookmarks and fields in the document. Think of providing API for easier manipulation. For example, following is one of the easiest approached to change the target of hyperlinks: var hyperlinkStarts = document .EnumerateChildrenOfType<FieldCharacter>() .Where(fc => fc.FieldCharacterType == FieldCharacterType.Start && fc.FieldInfo.Field is Hyperlink); foreach (var fieldCharacter in hyperlinkStarts) { int indexOfCodeRun = fieldCharacter.Paragraph.Inlines.IndexOf(fieldCharacter) + 1; Run hyperlinkCode = (Run)fieldCharacter.Paragraph.Inlines[indexOfCodeRun]; string oldUri = ((Hyperlink)fieldCharacter.FieldInfo.Field).Uri; string newUri = "mailto:mail@mail.com"; hyperlinkCode.Text = hyperlinkCode.Text.Replace($"\"{oldUri}\"", $"\"{newUri}\""); fieldCharacter.FieldInfo.UpdateField(); }
If the background color is applied to <tr> element then it is not imported. Workaround: The background color may be applied to the cells (<td> elements) in the desired row and this should have the same effect.
Currently, the text is exported but the strikethrough line is not drawn in the exported PDF.
Add support for exporting hyperlinks which are not valid URIs to PDF. Currently such hyperlink URIs are not exported to the PDF document. Example of such hyperlink is "mailto:abc%20abc-abc-abc%20%3cabc@abc.com%3e" (mailto:abc abc-abc-abc <abc@abc.com>), but there could be more types. Currently the internal API relies on creating instance of the system Uri class, which is not possible in this case.
When a break element is defined in the middle of a Run, DocxFormatProvider imports it at the end of the same run. For example, the following content: <w:r> <w:t>This is</w:t> <w:br/> <w:t xml:space="preserve"> a simple sentence.</w:t> </w:r> Results in "This is a simple sentence " + break element after it.