Introduce an option to implement custom field in RadFlowDocument model (one which is not supported by the document model). In the current implementation the abstract Field class has internal abstract method which is responsible for the GetFieldResult() method and this leads to an issue when a customer wants to implement a field which we currently do not support (CustomCodeField which returns null as a result fragment).
Exporting to PDF of a table with a first cell having preferred width of 100% and a second cell having preferred width of auto will result in missing the second cell.
The issue is observed with tables that have a specific width (in inches or percents) but whose columns do not have width specified. MS Word renders such tables expanded to their full width. For tables with 100% width, they have to expand to the entire width of the page. The same behavior is expected in the PDF export. As a common side effect, when specific text alignment (e.g. center or right) is applied to a paragraph within a table cell, and the table is with specified width, but the column is auto-sized (without set width), then the text alignment seems as not respected. Actually the problem is that the column table is shrunk to the text width. Workaround: this may be used before exporting the RadFlowDocument instance to PDF: foreach (Table table in document.EnumerateChildrenOfType<Table>()) { table.LayoutType = TableLayoutType.FixedWidth; } Workaround 2: Set specific width to the auto-sized columns (to any of the cells in the columns): cell.PreferredWidth = new Telerik.Windows.Documents.Flow.Model.Styles.TableWidthUnit(500); Available in R1 2018 SP2 release version.
In specific situations, a paragraph in a table cell which is last on a document page is not exported to the PDF document.
Possible workaround is adding a new paragraph to the last table cell before exporting the document.
For instance:
BlockCollection footerContent = this.document.Sections.First().Footers.Default.Blocks;
Table footerTable = footerContent.First() as Table;
footerTable.Rows.Last().Cells.First().Blocks.AddParagraph();
Content is moved from the second page to the first after applying styling to the footer and exporting to PDF format
When importing an image whose Uri is not a full Uri, an exception is thrown.
CSS style property with a numeric value will not be imported from HTML when the unit type is not specified. Example: .td{padding-bottom: 200;} This is invalid according to the HTML spec (value is optional only after 0), though web browsers and MS Word open such HTML's correctly.
Table's 'cellspacing' and 'cellpadding' are not imported from HTML when the unit is not specified, e.g. <table cellpadding="25">. According to the HTML Specification (https://www.w3.org/TR/REC-html40/struct/tables.html#adef-cellspacing), the only permitted values are: - only number - number followed by percent. MS Word imports it according to the specification (like WordsProcessing), but all of the browsers successfully imports values even with the px suffix, e.g. '25px'.
If the Table's TableCellSpacing property is not divided by 2 when the document is exported to Docx or Rtf, this leads to incorrect rendering after the exported document is opened with another editor (RadRichTextBox, MS Word). Workaround: Divide by two the Table's table cell spacing property value before export to Docx, RTF formats: foreach (Table table in document.EnumerateChildrenOfType<Table>()) { table.TableCellSpacing /= 2; }
Style properties defined in an element style selector are evaluated with higher priority over properties in a CSS class when importing from HTML. For example if we have the following CSS style: .sectionheading { border: 10px solid red; } td { border: 10px solid black; } and the class (.sectionheading) is applied on a table cell: <td class="sectionheading">...</td> The result in WordsProcessing after import of such HTML will be that the table cell has 10px black border. In MS Word and in the browsers (Chrome, Firefox...) the result will be that the cell has 10px red border.
It would be nice to have the ability to search text in documents. Use case: I needed to replace some keywords with images. I can insert image at the current position, but there is no way to insert it after some text.
If we have a list (<ol>, <ul>) with list items (<li>) and there is a paragraph inside a list item(<p>), an empty additional paragraph is imported if the <p> element is right next to the <li> element (without a space). The indentation of child paragraphs in list item could be messed up as well. If there is a space between the HTML elements, the content is imported as expected.
When the indentation of a paragraph is coming from a list, the RTF format provider applies them to the paragraph as local properties. This affects all conversions of documents containing lists from RTF to HTML. Workaround: After importing the document check if the indentation of the paragraph is the same as the one coming from the list. Here is example on how this could be done: RtfFormatProvider provider = new RtfFormatProvider(); RadFlowDocument document = provider.Import(stream); foreach (Paragraph paragraph in document.EnumerateChildrenOfType<Paragraph>()) { List list = this.document.Lists.GetList(paragraph.ListId); if (paragraph.Indentation.HangingIndent == list.Levels[0].ParagraphProperties.HangingIndent.LocalValue) { paragraph.Indentation.HangingIndent = Paragraph.HangingIndentPropertyDefinition.DefaultValue.Value; } if (paragraph.Indentation.FirstLineIndent == list.Levels[0].ParagraphProperties.FirstLineIndent.LocalValue) { paragraph.Indentation.FirstLineIndent = Paragraph.FirstLineIndentPropertyDefinition.DefaultValue.Value; } }
Respect the Height property of TableRow when exporting with PdfFormatProvider.
When this type of section break is used, the next section should start on the same page instead on the next one.
Implement evaluation of = (Formula) fields (https://support.office.com/en-us/article/Field-codes-Formula-field-32d5c9de-3516-4ec3-80ed-d1fc2b5bc21d?ui=en-US&rs=en-US&ad=US ). This will allow export to PDF and HTML.
When the last run from a paragraph is underlined, the associated bullet has underline applied as well. The same applies for the background color.
Implement page border property which could be applied over the whole document or over a specific page.
In WordsProcessing you could set table.Alignment = Telerik.Windows.Documents.Flow.Model.Styles.Alignment.Center; But when the document is exported to PDF, this is not respected.