Generate a document with the following approach: https://docs.telerik.com/devtools/document-processing/knowledge-base/populate-table-data-mail-merge
Before calling MailMerge, add two document variables with the editor: https://docs.telerik.com/devtools/document-processing/libraries/radwordsprocessing/concepts/fields/document-variables
Replace cannot match whole word with special characters (e.g. "#", "@", "&") at the start/end.
Workaround (RegEx):
editor.ReplaceText(new Regex($"(?<=\\s|^|[\\c_]){placeholder}(?=\\s|$|[\\c_])"),"new content");
Add support for Picture Styles.
InvalidOperationException when cloning a document containing fields spanning multiple paragraphs.
Workaround: instead of new paragraphs, use line breaks (Shift+Enter).
The default vertical alignment value of table data (<td>) is incorrect.
Current: "vertical-align: top;"
Expected: "vertical-align: middle;"
Workaround: Explicitly set the "vertical-align: middle;" of <td> elements.
More information about the feature can be found here: https://support.microsoft.com/en-us/office/add-or-remove-line-numbers-b67cd35e-422c-42eb-adc9-256ca9802e22
XmlException is thrown when importing documents containing DAT files.
Workaround:RadFlowDocument flowDocument;
using (Stream str = new FileStream("input.docx", FileMode.OpenOrCreate))
{
MemoryStream ms = new MemoryStream();
str.CopyTo(ms);
ms.Seek(0, SeekOrigin.Begin);
using (ZipArchive archive = ZipArchive.Update(ms, null))
{
var zipEntries = archive.Entries;
// Skip glossary on importfor (int i = zipEntries.Count() - 1; i >= 0; i--)
{
var entry = zipEntries.ElementAt(i);
string entryName = entry.FullName;
if (Regex.IsMatch(entryName, @"\[trash\]"))
{
entry.Delete();
}
}
}
}
Restrict the TableCellProperties API of a style according to specification.
Center alignment is not respected for list numbering.
Expected:
Actual:
When a document with multiple headings ( Heading 1) are imported and then exported, their type from letters is changed to numbers, for example:
Original content: Part A, Part B, Part C
Exported content: Part 1, Part 2, Part 3
The generated document looks OK before printing:
However, hitting the print preview button in MS Words leads to missing text in the fields: