Add support for shapes, and especially for shapes with textual content. In OOXML, shapes are represented by the wps:wsp element, and shapes with textual content by <wps:txbx>, <w:txbxContent>. Such shape can be added to a Word document using the Insert -> Text -> Text Box -> Draw Text Box, or through a shape's context menu -> Add Text. Do not confuse these shapes with Text/Rich Text content controls (see https://feedback.telerik.com/Project/184/Feedback/Details/190057 )
ParagraphMarkerProperties of a Paragraph element are not cloned and this leads to incorrect list numbering (bullets) rendering after export since the numbering styles (bullets, numbers and etc.) copy the style properties from there. This affects Clone() method of the Paragraph and ergo RadFlowDocumentEditor.InsertDocument() method and DocumentElementImporter.Import() methods since they're using Clone() method internally.
Paragraph with a negative left indent and positioned in the header or footer gets clipped when exported to PDF. The same behavior is also observed for paragraphs in tables. Instead, the paragraph should be rendered without clipping.
Enable the customers to work with .doc files.
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).
'thead' HTML element represents table row that should be repeated at the top of each page. MS Word maps this to TableRow with RepeatOnEveryPage set to true. This works for both export and import.
The font size in the table does not respect the CSS for the corresponding class. There is similar issue with <li /> element.
If the value from the source contains new lines, they should be inserted in the resulting documents as new paragraphs.
Workaround: Copy the default styles after the Mail Merge RadFlowDocument merged = sourceDocument.MailMerge(mailMergeSource); merged.DefaultStyle.ParagraphProperties.CopyPropertiesFrom(sourceDocument.DefaultStyle.ParagraphProperties); merged.DefaultStyle.CharacterProperties.CopyPropertiesFrom(sourceDocument.DefaultStyle.CharacterProperties);
The AltChunk element is responsible for embedding external content into documents.
According to the OOXML specification the shading color can be defined only in RRGGBB hex color, but MS Word also supports colors defined with their names - e.g. "Red".
Table and table cell borders are not evaluated according to inheritance and conflict resolution rules. A conflict will occur when different borders from the table and table cell are overlapping. The GetActualValue method of the TableBorders and TableCellBorders could potentially return an incorrect value in some of the following scenarios: Scenario 1: A table has cell spacing set to 0. Meaning that the table and table cell borders will overlap. The table borders have defined all of its borders with border style "Single". The table cell borders have all of its borders defined with border style "None". Expected result: the resulting borders should have the border style set to "None" for the location where the table and the cell borders are overlapping. Scenario 2: A table has explicitly defined that its right border is with border style "None". The table has a table style applied with defined border style of type "Single" for all table borders. Expected result: All of the table borders except the right border should have border style of "Single". The problem is mostly visible when exporting to PDF and RTF format.
When table row is empty, it's exported to PDF with incorrect height - depending on the type of height set with 0 or with the height of an empty paragraph.
When a paragraph has defined tab stops in its style and has the same tab stops locally cleared, the tab stops are still respected when exporting to PDF. Instead, cleared tab stops should not be respected.
Currently Run.Shading is not exported to PDF. Note: This scenario is common when converting HTML to PDF, as Run.Shading is set when construct like <span style="background-color:#ffcc00;"> is used. Workaround: Iterate all the Runs in the already imported HTML document and set their HighlightColor to Shading.BackgroundColor.LocalValue. Check this code snippet:
foreach (Run run in document.EnumerateChildrenOfType<Run>())
{
if (!run.Properties.HighlightColor.HasLocalValue)
{
run.HighlightColor = run.Shading.BackgroundColor.LocalValue;
}
}In MS Word you can crop the image from Picture Tools -> Format -> Size -> Crop button in the ribbon. This preserves the whole image in the file, but when it is rendered it shows only the cropped image area. This is described with 'srcRect' element in OOXML.
Workaround:
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);
}
}
}
}
The tblGrid property should be exported in order to visualize properly the documents in some viewers. For example, LibreOffice doesn't visualize properly tables without specified width.
Take into account the table row's CanSplit property when exporting to PDF from RadFlowDocument model. Is set to false, the table row should not be split between two pages, if possible. This property could be set to false, for example, when importing MS Word documents with "Allow row to break across pages" unchecked for some table rows.