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);
}
}
Exporting RTF document to HTML when there is a multilevel numbered list, strips the numbers and leaves only the main number visible (e.g. 2.1 becomes 1). Also, the text overlaps the numbering.
Workaround: Use numbers with letters instead of numbers only. (e.g. 1 a b c, 2 a b c).
To reproduce:
-Change the normal style in a document and insert it into another document using RenameSourceStyle option.
The style is renamed and inserted but is not applied to the content.
WordsProcessing: Merging a RadFlowDocument document into the target document over around 130 times breaks formatting when the target document is an empty RadFlowDocument.
The workaround to this issue is to set the target document to an existing RadFlowDocument such as the source before merging.
When this type of section break is used, the next section should start on the same page instead on the next one.
When calling the MailMerge method on a RadFlowDocument, which includes an IF field, where no FalseText (value to display when the expression evaluates to FALSE) is defined the following exception is thrown System.NullReferenceException: 'Object reference not set to an instance of an object.'
Workaround: Setting a string (empty works too) for the FalseText.
When the document is passed to the following method, all IF fields are edited so that the exception is not thrown:
private void EmptyIfSecondArgumentWorkaround(RadFlowDocument document)
{
List<FieldCharacter> collection = document.EnumerateChildrenOfType<FieldCharacter>().Where(f => f.FieldCharacterType == FieldCharacterType.Start).ToList();
for (int i = 0; i < collection.Count; i++)
{
FieldInfo item = collection[i].FieldInfo;
string code = item.GetCode();
FieldCharacter separator = item.Separator;
FieldCharacter end = item.End;
if (code.TrimStart().StartsWith("IF"))
{
FieldCharacter codeEnd;
if (separator.Paragraph != null)
{
codeEnd = separator;
}
else
{
codeEnd = end;
}
string emptyString = " \"\" ";
string mergeFormatCodeSuffix = "\\*";
if (codeEnd.Paragraph.Inlines.Count > 1)
{
string editedMergeFormatCodeSuffix = string.Join("", new string[] { emptyString, mergeFormatCodeSuffix });
int codeEndIndex = codeEnd.Paragraph.Inlines.IndexOf(codeEnd);
Run run = codeEnd.Paragraph.Inlines[codeEndIndex - 1] as Run;
if (run.Text.Contains(mergeFormatCodeSuffix))
{
run.Text=run.Text.Replace(mergeFormatCodeSuffix, editedMergeFormatCodeSuffix);
}
else
{
run.Text += emptyString;
}
}
}
}
}
Field code fragment is added to the result fragment and exported to PDF/HTML format. The problem is observed when the code fragment is divided into multiple inlines. For example we have PAGE field. If 'A' is bold we would have 3 inlines (runs) in the instruction text and the issue would be observed.
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); } } } }
Add support for smart tags (described in the OOXML using the smartTag element). As currently smart tags are not supported, the content inside them is not imported from docx.
Both properties table cell padding and table cell spacing are not exported to PDF format.