When table with table border without color set is created (the color is null), and the document is exported to PDF, ArgumentNullException is thrown. Workaround: Explicitly set a color where the color is null. private void PdfExport() { var tables = this.document.EnumerateChildrenOfType<Table>(); foreach (var table in tables) { TableBorders coloredClone = this.CopyTableBorders_SetColorWhenOmitted(table); table.Borders = coloredClone; using (Stream output = new FileStream(fileName, FileMode.OpenOrCreate)) { provider.Export(this.document, output); } } } private TableBorders CopyTableBorders_SetColorWhenOmitted(Table table) { var leftBorder = new Border(table.Borders.Left.Thickness, table.Borders.Left.Style, table.Borders.Left.Color ?? new ThemableColor(Colors.Transparent), table.Borders.Left.Shadow, table.Borders.Left.Frame, table.Borders.Left.Spacing); var rightBorder = new Border(table.Borders.Right.Thickness, table.Borders.Right.Style, table.Borders.Right.Color ?? new ThemableColor(Colors.Transparent), table.Borders.Right.Shadow, table.Borders.Right.Frame, table.Borders.Right.Spacing); var bottomBorder = new Border(table.Borders.Bottom.Thickness, table.Borders.Bottom.Style, table.Borders.Bottom.Color ?? new ThemableColor(Colors.Transparent), table.Borders.Bottom.Shadow, table.Borders.Bottom.Frame, table.Borders.Bottom.Spacing); var topBorder = new Border(table.Borders.Top.Thickness, table.Borders.Top.Style, table.Borders.Top.Color ?? new ThemableColor(Colors.Transparent), table.Borders.Top.Shadow, table.Borders.Top.Frame, table.Borders.Top.Spacing); var insideHorizontalBorder = new Border(table.Borders.InsideHorizontal.Thickness, table.Borders.InsideHorizontal.Style, table.Borders.InsideHorizontal.Color ?? new ThemableColor(Colors.Transparent), table.Borders.InsideHorizontal.Shadow, table.Borders.InsideHorizontal.Frame, table.Borders.InsideHorizontal.Spacing); var insideVerticalBorder = new Border(table.Borders.InsideVertical.Thickness, table.Borders.InsideVertical.Style, table.Borders.InsideVertical.Color ?? new ThemableColor(Colors.Transparent), table.Borders.InsideVertical.Shadow, table.Borders.InsideVertical.Frame, table.Borders.InsideVertical.Spacing); var tableBorders = new TableBorders(leftBorder, topBorder, rightBorder, bottomBorder, insideHorizontalBorder, insideVerticalBorder); return tableBorders; }
Implement import of PDF to RadFlowDocument, using PdfFormatProvider. This would require text recognition (including determining where paragraphs end as opposed to new line inserted because of the layout) and table recognition. This will allow conversion of PDF documents to docx, RTF and HTML.
Bookmark starts and ends that are not the child of a paragraph or table cannot be imported.
The <font> tag has a 'size' attribute that can be set to a number from 1 to 17. This is currently not supported and is just ignored.
When a document produced with WordsProcessing is validated with OpenXML Validator from OpenXML SDK, errors are found. While documents are valid according to the specification, Open XML SDK Validation shows errors related to the order of elements, etc. Resolve all errors, so DOCX documents pass validation.
KeyNotFoundException is thrown when importing RTF document where single font info is not declared in group, for example the following RTF doesn't work: {\rtf1\ansi\ansicpg1250\deff0{\fonttbl\f0\fswiss Helvetica;}\f0\pard test\par} while the following works: {\rtf1\ansi\ansicpg1250\deff0{\fonttbl{\f0\fswiss Helvetica;}}\f0\pard test \par} This is valid according to RTF specification, which allows omission of the group when only: <fonttbl> '{' \fonttbl (<fontinfo> | ('{' <fontinfo> '}'))+ '}'
Currently tabs are always exported to HTML using two -s. But tabs could have different length depending on Paragraph's tab stops and document's default tab stop width.
Page breaks can be exported and subsequently imported using the "page-break-before: always; " property set of some elements.
Introduce support for break-[before/after] and page-break-[before/after].This can eventually be extended to support "page-break-before: avoid" to preserve the value of the Paragraph.KeepWithNextParagraph property.
Attached to this item is a sample project demonstrating how an HTML file is imported into a RadFlowDocument, the custom page break string are replaced with Break elements of type PageBreak and then the RadFlowDocument is exported to PDF and DOCX files.
When document model contains styles with names containing characters which usage is not valid in CSS (e.g. '['), those characters must be escaped. Currently HTML documents containing invalid CSS are produced.
Styled text in a list item <li> is imported as a different paragraph. The result is split of the text into multiple paragraphs which are not in a list. The issue could be observed only when the text is written as a direct content of the <li> element. If it is in a <p> element the paragraph is imported correctly (it is not split). For example: problematic html (the paragraph will be split) - <li>An appointment may create any provisions <strong>and</strong> in particular: </li> non-problematic html (the paragraph will be imported as it should) - <li><p>An appointment may create any provisions <strong>and</strong> in particular: <p></li>
The document default style properties are not cloned on document.Clone(). There is a workaround by using the following code: var cloning = this.document.Clone(); ClearPropertiesWithoutValueAndSetLocalValues(this.document.DefaultStyle.CharacterProperties, cloning.DefaultStyle.CharacterProperties); ClearPropertiesWithoutValueAndSetLocalValues(this.document.DefaultStyle.ParagraphProperties, cloning.DefaultStyle.ParagraphProperties); private void ClearPropertiesWithoutValueAndSetLocalValues(DocumentElementPropertiesBase propertiesFrom, DocumentElementPropertiesBase propertiesTo) { foreach (var stylePropertyFrom in propertiesFrom.StyleProperties) { var stylePropertyTo = propertiesTo.GetStyleProperty(stylePropertyFrom.PropertyDefinition); stylePropertyTo.ClearValue(); if (stylePropertyFrom.HasLocalValue) { object value = stylePropertyTo.GetLocalValueAsObject(); stylePropertyTo.SetValueAsObject(value); } } }
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.