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.
The construct <link rel=
"stylesheet"
href=
"main.min.css"
/>
doesn't raise the HtmlImportSettings.LoadFromUri event on import, as we currently require type="text\css" to be specified explicitly.
type
attribute, but is actually now recommended practice.
Think of improving the message of the exception we throw if no data is loaded.
Workaround: set type explicitly:<link rel=
"stylesheet"
type=
"text/css"
href=
"main.min.css"
/>
foreach (var style in this.document.StyleRepository.Styles)
{
if (style.StyleType == StyleType.Table)
{
if (style.LinkedStyleId != null)
{
style.LinkedStyleId = null;
}
}
}
The empty lines are not converted properly from RTF to HTML
Workaround:
private static void FixEmptyParagraphs(RadFlowDocument document)<ul>
<li>
<div>Text</div>
</li>
</ul>
When <div> elements contain non-inline HTML elements, they and their styles are removed on import.
Input:
<div style="margin-left: 200px;">
<ol>
<li>Item 1</li>
<li>Item 2</li>
</ol>
</div>
Output:
<ol style="list-style-type: decimal;">
<li value="1"><span>Item 1</span></li>
<li value="2"><span>Item 2</span></li>
</ol>
Workaround: Set the style properties to the inner elements. They will not disappear.