There is a discrepancy between RadWordsProcessing and MS Word:
A possible workaround could be to set the row height the same as the image height:row.Height = new TableRowHeight(HeightType.Exact, image.Image.Height);
Wrongly exported table width when the table preferred width is set to fixed:
<w:tblW w:w="11160" w:type="dxa"/>
and it is greater than the available page width:
<w:pgSz w:w="12240" w:h="15840"/>
<w:pgMar w:top="630" w:right="1440" w:bottom="540" w:left="1440" w:header="720" w:footer="720" w:gutter="0"/>
Available page width = 12240 - (1440 + 1440) = 9360
A possible workaround is to set the page width to Auto:
IEnumerable<Table> tables = document.EnumerateChildrenOfType<Table>();
foreach (Table table in tables)
{
if (table.PreferredWidth.Type == TableWidthUnitType.Fixed)
{
table.PreferredWidth = new TableWidthUnit(TableWidthUnitType.Auto, table.PreferredWidth.Value);
}
}
<w:pict ...>
<v:shape ...>
<v:fill opacity="39151f"/>
<v:path .../>
<w10:wrap anchorx="page" anchory="page"/>
</v:shape>
</w:pict>
foreach (ImageInline image in document.EnumerateChildrenOfType<ImageInline>().ToList())
{
UriImageSource uriImageSource = (UriImageSource)image.Image.ImageSource;
if (uriImageSource != null && !IsValid(uriImageSource.Uri.OriginalString))
{
image.Paragraph.Inlines.Remove(image);
}
}
private static bool IsValid(string uri)
{
try
{
Path.GetExtension(uri);
}
catch (ArgumentException)
{
return false;
}
return true;
}
editor.InsertField("PAGE", "1")
Borders are not correctly imported from HTML.
Workaround: Set borders in code:
var tables = document.EnumerateChildrenOfType<Table>();
var border = new Border(1, BorderStyle.Single, new ThemableColor(Colors.Black));
foreach (var table in tables)
{
table.Borders = new TableBorders(border);
foreach (var row in table.Rows)
{
foreach (var cell in row.Cells)
{
cell.Borders = new TableCellBorders(border);
}
}
}
Revisions in WordprocessingML provide a mechanism for storing information about the evolution of the
document (i.e. the set of modifications made to a document by one or more authors).
This element specifies that this run contains literal text which shall be displayed in the document. The delText
element shall be used for all text runs which are part of a region of text that is contained in a deleted region
using the del element.
This is the preview (This is deleted text) of the following XML:
<w:p>
<w:r>
<w:t xml:space="preserve">This is </w:t>
</w:r>
<w:del w:author="Cooper W.">
<w:r>
<w:delText>deleted text</w:delText>
</w:r>
</w:del>
</w:p>
Dear all,
It seems that the RtfFormatProvider generates invalid alternative text in the "{\listtext }" RTF group when saving a RadFlowDocument that contains numbered paragraphs.
The text seems to always be "{N}" when level N of the list is used.
While this is no problem for readers that adhere to the latest RTF standard, RichEdit-based controls and WordPad in Windows 8-10 have issues with it and do not load the list. These versions of RichEdit are otherwise capable of reading list tables.
Please note that I am not talking about loading the document to Windows 7 RichEdit, since that does not support list tables at all (it is stuck to the Word '95 "{\*\pn ...}" format).
I submit a simple list example that can be read by WordPad in Windows 10 and the outcome after loading and saving it back with RtfFormatProvider.
The outcome loads correctly in Word and RadRichtextBox, but not in WordPad. Removing or correcting the "{\listtext ...}" for each paragraph manually makes the list load properly in WordPad.
BTW, I strongly disagree with the nonexistent support for the Word '95 RTF numbering format, since it either forces us to use some other product or create our own code to parse and massage the RTF prior to loading into your products.
The problem is great, as many controls/products are still based on the RichEdit control (including some versions of our products).
It is not only old RTF data that needs migration, but pasted content from WordPad or other applications as well, since otherwise numbering is killed, without even displaying any text present in "{\pntext ... }" groups, intended for readers that do not understand "{\*\pn ...}".
Finally, to make things worse, even in Windows 10, RichEdit uses Word '95 format for saving single-level lists (resulting in content with mixed list formats).
Anyway, thank you for your time.
Wrong exported paragraph indentation when the paragraph is in a table cell.
Workaround: Iterate table`s paragraphs and set the negative indentations to zero:
IEnumerable<Table> tables = this.document.EnumerateChildrenOfType<Table>();
foreach (Table table in tables)
{
IEnumerable<Paragraph> paragraphs = table.EnumerateChildrenOfType<Paragraph>();
foreach (Paragraph paragraph in paragraphs)
{
if (paragraph.Indentation.LeftIndent < 0)
{
paragraph.Indentation.LeftIndent = 0;
}
}
}