The content controls ID's must be set automatically when once clones or inserts an SDT.
Workaround: Manually set the ID
SdtRangeStart start = grpContentControls.Where(c => Convert.ToString(c.SdtProperties.Tag) == "purchlastname").First();
var properties = new SdtProperties(start.SdtProperties);
properties.ID = 123456;
var currentItem = editor.InsertStructuredDocumentTag(properties);
<w:tblCellMar>
<w:top w:w="2880" w:type="dxa"/>
<w:bottom w:w="2880" w:type="dxa"/>
</w:tblCellMar>
<w:tblCellMar>
<w:top w:w="2880" w:type="dxa"/>
<w:left w:w="0" w:type="dxa"/>
<w:right w:w="0" w:type="dxa"/>
<w:bottom w:w="2880" w:type="dxa"/>
</w:tblCellMar>
Importing html image with no source and then exporting it to pdf causes an exception, instead of omitting the faulty image.
Such images can be stripped using the following workaround:
List<ImageInline> images = this.document.EnumerateChildrenOfType<ImageInline>().ToList();
foreach (var image in images) { if (image.Image.ImageSource == null) { image.Paragraph.Inlines.Remove(image); } }
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;
}
}
}
}
}
Introduce support for min-height. Currently, this property is skipped.
As a possible workaround, the height property of the table row could be applied.When inserting a section between two paragraphs the section parent is not correct.
Example:
Paragraph paragraph1 = editor.InsertParagraph(); Paragraph paragraph2 = editor.InsertParagraph(); editor.InsertSection(); Paragraph paragraph3 = editor.InsertParagraph();
Expected:
paragraph1.Parent == paragraph2.Parent
paragraph2.Parent != paragraph3.Parent
Actual:
paragraph1.Parent != paragraph2.Parent
paragraph2.Parent == paragraph3.Parent
Find and Replace document elements with special characters.
The image in the header is not exported to pdf.
Workaround: Use version R1 2022 where this is working.