When importing paragraphs with negative text-indent from HTML, e.g. <p style="text-indent:-12px;"> test </p> they should be imported with HangingIndent + the same value with negative sign for LeftIndent, e.g. HandingIndent: 12 AND LeftIndent: -12. Also, margin-left should be combined with the text-indent, e.g. <p style="margin-left: 16px;text-indent: -16px;"> test </p> should be imported as HandingIndent: 16 AND LeftIndent: 0.
The table height is currently not respected when applied to a table element through an attribute or through a CSS style. This setting is not respected in the flow document model, but we could import it and calculate the value to distribute it to the rows.
Currently, this property is exported only for Run and Paragraph elements.
The issue is reproducible only in a specific setup with a specific document. It is related to the calculations of the line spacing when the table row should be split between two pages.
Workaround: Change the line spacing:
foreach (var paragraph in this.document.EnumerateChildrenOfType<Paragraph>())
{
paragraph.Properties.LineSpacingType.LocalValue = HeightType.Auto;
paragraph.Properties.LineSpacing.LocalValue = 1;
}
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 border="1" to a table element, should set table cells borders to the same value. Currently, only the table borders are set.
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".
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.
When the document contains an image with extension, which is not among the supported ones, a KeyNotFoundException is thrown during Import.
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); } } } }
When the value in the document variable collection and the argument of the DOCVARIABLE fields are with different casing, the field is not updated. Available in LIB Version 2018.3.1029.
When a HTML has a wrong encoding set (content="text/html; charset=utf-16") we use the UTF-16 encoding when importing this HTML. This leads to wrong import. Microsoft Word detects that the set encoding is wrong and uses UTF-8 instead so that the imported result is correct. The HTML5 specification forbids the use of the meta element to declare UTF-16, because the values must be ASCII-compatible: https://www.w3.org/International/questions/qa-html-encoding-declarations#utf16
For example, <h1> is imported as Heading 1 with font the following properties:
While MS Word imports it as:
document.DefaultTabStopWidth = 0.1;
Importing document with invalid bookmarks throws System.Collections.Generic.KeyNotFoundException. The issue is caused by an invalid bookmark having missing BookmarkRangeStart/bookmarkStart or BookmarkRangeEnd/bookmarkEnd elements.