When some character is not supported by the font, the fallback mechanism should try finding some other font that is capable of rendering the unsupported character. However, RadPdfProcessing fallback mechanism does not always find the correct font which sometimes result in wrong glyph visualization or in missing glyph. Workaround: Font that supports these special characters may be used. This way the fallback mechanism will not be needed to export the PDF text.
When a paragraph is placed inside a list item (<li> tag), the paragraph properties are not applied to it 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".
When a document has a list in it and the element containing it is cloned into another document, there is a key not found exception if you try to export the second document.
RadFlowDocument document = new RadFlowDocument(); if (tableDocument.Sections.First().Blocks.First() is Table workSheetTable) { Table clonedTable = workSheetTable.Clone(document); var newSection = document.Sections.AddSection(); newSection.Blocks.Add(clonedTable); } byte[] pdfBytes = pdfProvider.Export(document); byte[] docBytes = docxProvider.Export(document);
The Spacing Before property of the paragraph at the start of the page should not be respected if it is not the first one inside the current section.
Manually overriding the Spacing Before property would resolve the issue.
Updating a Table of Contents field with a custom TOC Style does not respect it.
As a workaround modify the style after the TOC fields are updated.
When the last element in a table cell is an empty paragraph, the latter is skipped and not imported. It should be imported even if it's the only paragraph in the cell, as its properties could affect the layout and presentation (borders, colors, spacings).
When the document is encoded in two-byte encoding using Little-Endian, the CsQuery HTML parser provides the entire document as FirstChild of the <body> tag, which leads to incorrect import. This seems to be occurring with MS Outlook messages saved as HTML. Workaround: convert the file to Big-Endian encoding before importing.
Using a RadFlowDocumentEditor to add a page break and then insert a table, adds an additional paragraph in between.
As a workaround you can call the CleanParagraphsBeforeTablesOnNewPage() method:
private void CleanParagraphsBeforeTablesOnNewPage()
{
List<Paragraph> paragraphs = this.flowDocument.EnumerateChildrenOfType<Paragraph>().ToList();
foreach (var paragraph in paragraphs)
{
BlockContainerBase parent = (BlockContainerBase)paragraph.Parent;
int paragraphIndex = parent.Blocks.IndexOf(paragraph);
int blocksCount = parent.Blocks.Count;
bool isAfterPageBreak = paragraphIndex > 0 && this.PreviousBlockEndsWithPageBreak(parent.Blocks[paragraphIndex - 1]);
int nextIndex = paragraphIndex + 1;
bool nextBlockIsTable = nextIndex < blocksCount && parent.Blocks[nextIndex] is Table;
if (isAfterPageBreak && nextBlockIsTable)
{
parent.Blocks.Remove(paragraph);
}
}
}
private bool PreviousBlockEndsWithPageBreak(BlockBase blockBase)
{
bool isLastInlinePageBreak = false;
bool isParagraph = blockBase is Paragraph;
if (isParagraph)
{
Paragraph paragraph = (Paragraph)blockBase;
InlineBase lastInline = paragraph.Inlines.Last();
bool isBreak = lastInline is Break;
if (isBreak)
{
isLastInlinePageBreak = ((Break)lastInline).BreakType == BreakType.PageBreak;
}
}
return isLastInlinePageBreak;
}