A NullReferenceException is thrown when importing a hyperlink that doesn't contain any run elements. Similar hyperlinks could be skipped so the document can be successfully imported. Available in R3 2018 SP1 release.
HtmlFormatProvider treats <script type="text/javascript"> as document elements and inserts the content (js code) as text in the document. The issue is observed when CDATA is used as well.
When paragraph contains only merge fields (and eventually whitespaces), and all of these fields are evaluated to empty string for particular data record, the paragraph could be removed from the merged document. Example: The document contains two paragraphs: <<FirstName>> <<LastName>> <<Address>> For particular data record, LastName and Address are empty, so the merged document for this data record will contain only one paragraph (the first one). This behavior is expected from customers, as it's implemented by MS Word.
When MergeField is present in the document, and this merge field is evaluated to an empty string - this, for example, happens when the property in the data source is set to null, empty string, or is missing at all - the result fragment remains in the result document. Instead, it should be removed. Steps to reproduce: - Create document with merge field, the field should contain result fragment, and set data source which contains null or string.Empty value for the field: RadFlowDocument document = new RadFlowDocument(); RadFlowDocumentEditor editor = new RadFlowDocumentEditor(document); editor.InsertField("MERGEFIELD FirstName ", "«FirstName»"); List<Person> source = new List<Person>() { new Person() { FirstName = string.Empty } }; RadFlowDocument mergedDocument = document.MailMerge(source); Expected: The result document is empty. Actual: The result document contains "«FirstName»" string. Available in LIB Version 2017.3.1120.
Currently, this property is exported only for Run and Paragraph elements.
The table height is currently not respected when applied to a table element through an attribute or through a CSS style. This setting is not respected in the flow document model, but we could import it and calculate the value to distribute it to the rows.
When importing paragraphs with negative text-indent from HTML, e.g. <p style="text-indent:-12px;"> test </p> they should be imported with HangingIndent + the same value with negative sign for LeftIndent, e.g. HandingIndent: 12 AND LeftIndent: -12. Also, margin-left should be combined with the text-indent, e.g. <p style="margin-left: 16px;text-indent: -16px;"> test </p> should be imported as HandingIndent: 16 AND LeftIndent: 0.
The current implementation uses System.Windows.Media.Imaging.BitmapImage class in order to take the image pixels for the PDF export. However, BitmapImage class throws NotSupportedException when being initialized with a WMF or EMF image. WORKAROUND: WMF and EMF images may be converted to PNG images before the PDF export. The following code snippet shows how to convert all inline WMF image to PNG images by using System.Drawing.Image class:private
static
void
ConvertInlineWmfImagesToPng(RadFlowDocument document)
{
foreach
(ImageInline image
in
document.EnumerateChildrenOfType<ImageInline>())
{
if
(image.Image.ImageSource.Extension.Equals(
"wmf"
, StringComparison.InvariantCultureIgnoreCase))
{
using
(MemoryStream wmfImageStream =
new
MemoryStream(image.Image.ImageSource.Data))
{
using
(MemoryStream pngImageStream =
new
MemoryStream())
{
var imageDrawing = System.Drawing.Image.FromStream(wmfImageStream);
imageDrawing.Save(pngImageStream, ImageFormat.Png);
byte
[] pngBytes = pngImageStream.ToArray();
image.Image.ImageSource =
new
ImageSource(pngBytes,
"png"
);
}
}
}
}
}
Currently, this property is implemented only in DOCX and RTF exports.
Although this is not a valid table scenario we should not throw an exception when measuring and exporting such table. Fix available in LIB Version 2017.3.1218.
When the imported html contains an attribute of the type width="", Wordsprocessing throws ArgumentException and does not import the document.
This is happening because the cell with preferred width 100% takes all the available width and all other columns are rendered with no available width which causes the height of the table to grow big. WORKAROUND: Either clear the cell PreferredWidth property or set it to value which is smaller than 100%.
When the document contains an image that is defined as an external resource but is not available in the specified location and cannot be found, a KeyNotFoundException is thrown. Handle this exception and replace the missing image with a default one for such cases. Consider exposing an option to notify the user about this error.
This property will control whether a table row may start on one page and end on the next page. Declined: Duplicate with https://feedback.telerik.com/Project/184/Feedback/Details/190081-wordsprocessing-respect-tablerow-cansplit-property-when-exporting-to-pdf.
This field allows performing a mail merge operations with labels representing different source items on the same page.
<w:pict w14:anchorId="324D5836">
<v:rect id="_x0000_i1025" style="width:0;height:1.5pt" o:hralign="center" o:hrstd="t" o:hr="t" fillcolor="#a0a0a0" stroked="f"/>
</w:pict>
Importing an image from HTML with URI as a source, which has applied only width or height and exporting it to PDF (which forces getting the image data so it can be drawn) leads to an incorrect value of 1 (a default value) for the dimension that is not specified.
The default table style is not respected from the style system for character or paragraph properties when exporting to PDF format. It looks only into the default paragraph style. Steps to reproduce: 1. Create new Table style and set it as default. 2. Apply foreground themeable color with a value from the document theme. Like Accent1 3. Insert a table with some text in it. 4. Export to PDF. Observed: The text inside the table is not with the color from the document theme.
When exporting to PDF a paragraph in a list, whose first run is longer than the line, the bullets are rendered with wrong baseline and not aligned with the text.
Importing a document containing a bookmark located in a structured document tag (sdt) will lead to ArgumentNullException.