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>This results in a missing paragraph. For example, having a table with three cells and Page field in the footer of a document and exporting it to PDF, will not export the last paragraph.
As a workaround add new run after the last field character in the cell's table before exporting the document to PDF.
BlockCollection footerContent = this.document.Sections.First().Footers.Default.Blocks;
Table footerTable = footerContent.First() as Table;
var cells = footerTable.Rows.Last().Cells.Where(x => x.EnumerateChildrenOfType<FieldCharacter>().Any());
foreach (var cell in cells)
{
cell.Blocks.AddParagraph().Inlines.AddRun();
}